rust-clippy/tests/ui/double_comparison.stderr

53 lines
1.4 KiB
Text
Raw Normal View History

2018-01-30 01:35:35 +00:00
error: This binary expression can be simplified
2018-12-10 05:27:19 +00:00
--> $DIR/double_comparison.rs:13:8
2018-10-06 16:18:06 +00:00
|
2018-12-10 05:27:19 +00:00
13 | if x == y || x < y {
2018-10-06 16:18:06 +00:00
| ^^^^^^^^^^^^^^^ help: try: `x <= y`
|
= note: `-D clippy::double-comparisons` implied by `-D warnings`
2018-01-30 01:35:35 +00:00
error: This binary expression can be simplified
2018-12-10 05:27:19 +00:00
--> $DIR/double_comparison.rs:16:8
2018-10-06 16:18:06 +00:00
|
2018-12-10 05:27:19 +00:00
16 | if x < y || x == y {
2018-10-06 16:18:06 +00:00
| ^^^^^^^^^^^^^^^ help: try: `x <= y`
2018-01-30 01:35:35 +00:00
error: This binary expression can be simplified
2018-12-10 05:27:19 +00:00
--> $DIR/double_comparison.rs:19:8
2018-01-30 01:35:35 +00:00
|
2018-12-10 05:27:19 +00:00
19 | if x == y || x > y {
2018-01-30 01:35:35 +00:00
| ^^^^^^^^^^^^^^^ help: try: `x >= y`
error: This binary expression can be simplified
2018-12-10 05:27:19 +00:00
--> $DIR/double_comparison.rs:22:8
2018-01-30 01:35:35 +00:00
|
2018-12-10 05:27:19 +00:00
22 | if x > y || x == y {
2018-01-30 01:35:35 +00:00
| ^^^^^^^^^^^^^^^ help: try: `x >= y`
error: This binary expression can be simplified
2018-12-10 05:27:19 +00:00
--> $DIR/double_comparison.rs:25:8
2018-01-30 01:35:35 +00:00
|
2018-12-10 05:27:19 +00:00
25 | if x < y || x > y {
2018-01-30 01:35:35 +00:00
| ^^^^^^^^^^^^^^ help: try: `x != y`
error: This binary expression can be simplified
2018-12-10 05:27:19 +00:00
--> $DIR/double_comparison.rs:28:8
2018-01-30 01:35:35 +00:00
|
2018-12-10 05:27:19 +00:00
28 | if x > y || x < y {
2018-01-30 01:35:35 +00:00
| ^^^^^^^^^^^^^^ help: try: `x != y`
error: This binary expression can be simplified
2018-12-10 05:27:19 +00:00
--> $DIR/double_comparison.rs:31:8
2018-01-30 01:35:35 +00:00
|
2018-12-10 05:27:19 +00:00
31 | if x <= y && x >= y {
2018-01-30 01:35:35 +00:00
| ^^^^^^^^^^^^^^^^ help: try: `x == y`
error: This binary expression can be simplified
2018-12-10 05:27:19 +00:00
--> $DIR/double_comparison.rs:34:8
2018-01-30 01:35:35 +00:00
|
2018-12-10 05:27:19 +00:00
34 | if x >= y && x <= y {
2018-01-30 01:35:35 +00:00
| ^^^^^^^^^^^^^^^^ help: try: `x == y`
error: aborting due to 8 previous errors