Skip to content

Commit

Permalink
Examples fixes for regex
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-semenyuk authored Dec 24, 2024
1 parent 988042e commit be09596
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions clippy_lints/src/regex.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ declare_clippy_lint! {
/// ```ignore
/// Regex::new("(")
/// ```
///
/// Use instead:
/// ```ignore
/// Regex::new("\(")
/// ```
#[clippy::version = "pre 1.29.0"]
pub INVALID_REGEX,
correctness,
Expand All @@ -49,6 +54,11 @@ declare_clippy_lint! {
/// ```ignore
/// Regex::new("^foobar")
/// ```
///
/// Use instead:
/// ```ignore
/// str::starts_with("foobar")
/// ```
#[clippy::version = "pre 1.29.0"]
pub TRIVIAL_REGEX,
nursery,
Expand Down

0 comments on commit be09596

Please sign in to comment.