diff options
| author | dswij <dharmasw@outlook.com> | 2024-12-29 09:30:01 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-12-29 09:30:01 +0000 |
| commit | aef47725a3d80a699a318185a90c45c23f399efa (patch) | |
| tree | 5ba51a5ba7cbe4c20fb5cf2717f239a46a8d5938 | |
| parent | 786f090bb9a62ab73102dbd7a4b9bf05f4fedd2d (diff) | |
| parent | be09596df901c094f803abacc4aa81e1d45c8e3b (diff) | |
| download | rust-aef47725a3d80a699a318185a90c45c23f399efa.tar.gz rust-aef47725a3d80a699a318185a90c45c23f399efa.zip | |
Examples fixes for regex (#13874)
Examples fixes for regex changelog: none
| -rw-r--r-- | clippy_lints/src/regex.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/clippy_lints/src/regex.rs b/clippy_lints/src/regex.rs index 6a5bf1b8045..2f77989b379 100644 --- a/clippy_lints/src/regex.rs +++ b/clippy_lints/src/regex.rs @@ -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, @@ -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, |
