Examples fixes for regex
This commit is contained in:
parent
988042e0b2
commit
be09596df9
1 changed files with 10 additions and 0 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue