bool-comparison: make lint adhere to lint message convention

This commit is contained in:
Matthias Krüger 2020-07-23 15:14:12 +02:00
parent e57aafe33f
commit 0876f17d77
2 changed files with 5 additions and 5 deletions

View File

@ -243,7 +243,7 @@ fn check_comparison<'a, 'tcx>(
cx,
BOOL_COMPARISON,
e.span,
"This comparison might be written more concisely",
"this comparison might be written more concisely",
"try simplifying it as shown",
format!(
"{} != {}",

View File

@ -84,25 +84,25 @@ error: order comparisons between booleans can be simplified
LL | if x > y {
| ^^^^^ help: try simplifying it as shown: `x & !y`
error: This comparison might be written more concisely
error: this comparison might be written more concisely
--> $DIR/bool_comparison.rs:120:8
|
LL | if a == !b {};
| ^^^^^^^ help: try simplifying it as shown: `a != b`
error: This comparison might be written more concisely
error: this comparison might be written more concisely
--> $DIR/bool_comparison.rs:121:8
|
LL | if !a == b {};
| ^^^^^^^ help: try simplifying it as shown: `a != b`
error: This comparison might be written more concisely
error: this comparison might be written more concisely
--> $DIR/bool_comparison.rs:125:8
|
LL | if b == !a {};
| ^^^^^^^ help: try simplifying it as shown: `b != a`
error: This comparison might be written more concisely
error: this comparison might be written more concisely
--> $DIR/bool_comparison.rs:126:8
|
LL | if !b == a {};