trivial_regex
false positive and/or incorrect hint for replace
?
#1943
Labels
C-enhancement
Category: Enhancement of lints, like adding more cases or adding help messages
E-medium
Call for participation: Medium difficulty level problem and requires some initial experience.
T-middle
Type: Probably requires verifiying types
I love the new lints! But I found what seems to be a false positive:
For the following code:
...the
trivial_regex
lint suggests:Not all regular expressions are used for matches, and I'm not aware of anything in
std
that implements "replace this string only at the beginning of another string."The text was updated successfully, but these errors were encountered: