mirror of
https://github.com/rust-lang/rust-clippy
synced 2025-02-17 06:28:42 +00:00
double-comparisons: make lint adhere to lint message convention
This commit is contained in:
parent
6b0a6a70f8
commit
ba7a01a6a8
2 changed files with 9 additions and 9 deletions
|
@ -60,7 +60,7 @@ impl<'tcx> DoubleComparisons {
|
||||||
cx,
|
cx,
|
||||||
DOUBLE_COMPARISONS,
|
DOUBLE_COMPARISONS,
|
||||||
span,
|
span,
|
||||||
"This binary expression can be simplified",
|
"this binary expression can be simplified",
|
||||||
"try",
|
"try",
|
||||||
sugg,
|
sugg,
|
||||||
applicability,
|
applicability,
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
error: This binary expression can be simplified
|
error: this binary expression can be simplified
|
||||||
--> $DIR/double_comparison.rs:6:8
|
--> $DIR/double_comparison.rs:6:8
|
||||||
|
|
|
|
||||||
LL | if x == y || x < y {
|
LL | if x == y || x < y {
|
||||||
|
@ -6,43 +6,43 @@ LL | if x == y || x < y {
|
||||||
|
|
|
|
||||||
= note: `-D clippy::double-comparisons` implied by `-D warnings`
|
= note: `-D clippy::double-comparisons` implied by `-D warnings`
|
||||||
|
|
||||||
error: This binary expression can be simplified
|
error: this binary expression can be simplified
|
||||||
--> $DIR/double_comparison.rs:9:8
|
--> $DIR/double_comparison.rs:9:8
|
||||||
|
|
|
|
||||||
LL | if x < y || x == y {
|
LL | if x < y || x == y {
|
||||||
| ^^^^^^^^^^^^^^^ help: try: `x <= y`
|
| ^^^^^^^^^^^^^^^ help: try: `x <= y`
|
||||||
|
|
||||||
error: This binary expression can be simplified
|
error: this binary expression can be simplified
|
||||||
--> $DIR/double_comparison.rs:12:8
|
--> $DIR/double_comparison.rs:12:8
|
||||||
|
|
|
|
||||||
LL | if x == y || x > y {
|
LL | if x == y || x > y {
|
||||||
| ^^^^^^^^^^^^^^^ help: try: `x >= y`
|
| ^^^^^^^^^^^^^^^ help: try: `x >= y`
|
||||||
|
|
||||||
error: This binary expression can be simplified
|
error: this binary expression can be simplified
|
||||||
--> $DIR/double_comparison.rs:15:8
|
--> $DIR/double_comparison.rs:15:8
|
||||||
|
|
|
|
||||||
LL | if x > y || x == y {
|
LL | if x > y || x == y {
|
||||||
| ^^^^^^^^^^^^^^^ help: try: `x >= y`
|
| ^^^^^^^^^^^^^^^ help: try: `x >= y`
|
||||||
|
|
||||||
error: This binary expression can be simplified
|
error: this binary expression can be simplified
|
||||||
--> $DIR/double_comparison.rs:18:8
|
--> $DIR/double_comparison.rs:18:8
|
||||||
|
|
|
|
||||||
LL | if x < y || x > y {
|
LL | if x < y || x > y {
|
||||||
| ^^^^^^^^^^^^^^ help: try: `x != y`
|
| ^^^^^^^^^^^^^^ help: try: `x != y`
|
||||||
|
|
||||||
error: This binary expression can be simplified
|
error: this binary expression can be simplified
|
||||||
--> $DIR/double_comparison.rs:21:8
|
--> $DIR/double_comparison.rs:21:8
|
||||||
|
|
|
|
||||||
LL | if x > y || x < y {
|
LL | if x > y || x < y {
|
||||||
| ^^^^^^^^^^^^^^ help: try: `x != y`
|
| ^^^^^^^^^^^^^^ help: try: `x != y`
|
||||||
|
|
||||||
error: This binary expression can be simplified
|
error: this binary expression can be simplified
|
||||||
--> $DIR/double_comparison.rs:24:8
|
--> $DIR/double_comparison.rs:24:8
|
||||||
|
|
|
|
||||||
LL | if x <= y && x >= y {
|
LL | if x <= y && x >= y {
|
||||||
| ^^^^^^^^^^^^^^^^ help: try: `x == y`
|
| ^^^^^^^^^^^^^^^^ help: try: `x == y`
|
||||||
|
|
||||||
error: This binary expression can be simplified
|
error: this binary expression can be simplified
|
||||||
--> $DIR/double_comparison.rs:27:8
|
--> $DIR/double_comparison.rs:27:8
|
||||||
|
|
|
|
||||||
LL | if x >= y && x <= y {
|
LL | if x >= y && x <= y {
|
||||||
|
|
Loading…
Add table
Reference in a new issue