tests: use fragment of lint text for error checking
(Did not touch strings.rs, which is fixed by @llogiq's PR)
This commit is contained in:
parent
dbd396db91
commit
7aee04878f
15 changed files with 118 additions and 118 deletions
|
|
@ -37,7 +37,7 @@ impl LintPass for NeedlessBool {
|
|||
"you can reduce your if statement to its predicate"); },
|
||||
(Option::Some(false), Option::Some(true)) => {
|
||||
span_lint(cx, NEEDLESS_BOOL, e.span,
|
||||
"you can reduce your if statement to `!` + your predicate"); },
|
||||
"you can reduce your if statement to `!` + its predicate"); },
|
||||
(Option::Some(false), Option::Some(false)) => {
|
||||
span_lint(cx, NEEDLESS_BOOL, e.span,
|
||||
"your if-then-else expression will always return false"); },
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue