about summary refs log tree commit diff
path: root/clippy_lints/src
diff options
context:
space:
mode:
authoralexey semenyuk <alexsemenyuk88@gmail.com>2024-12-24 18:36:10 +0500
committerGitHub <noreply@github.com>2024-12-24 18:36:10 +0500
commitbe09596df901c094f803abacc4aa81e1d45c8e3b (patch)
tree25450a1077940c52cfb4ce6746d32cd16206d859 /clippy_lints/src
parent988042e0b2c806352cb3e6583a2e093d3ee086fa (diff)
downloadrust-be09596df901c094f803abacc4aa81e1d45c8e3b.tar.gz
rust-be09596df901c094f803abacc4aa81e1d45c8e3b.zip
Examples fixes for regex
Diffstat (limited to 'clippy_lints/src')
-rw-r--r--clippy_lints/src/regex.rs10
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,