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-10-06 16:18:06 +00:00
--> $DIR/double_comparison.rs:14:8
|
14 | if x == y || x < y {
| ^^^^^^^^^^^^^^^ 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-10-06 16:18:06 +00:00
--> $DIR/double_comparison.rs:17:8
|
17 | if x < y || x == y {
| ^^^^^^^^^^^^^^^ help: try: `x <= y`
2018-01-30 01:35:35 +00:00
error: This binary expression can be simplified
2018-10-06 16:18:06 +00:00
--> $DIR/double_comparison.rs:20:8
2018-01-30 01:35:35 +00:00
|
2018-10-06 16:18:06 +00:00
20 | 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-10-06 16:18:06 +00:00
--> $DIR/double_comparison.rs:23:8
2018-01-30 01:35:35 +00:00
|
2018-10-06 16:18:06 +00:00
23 | 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-10-06 16:18:06 +00:00
--> $DIR/double_comparison.rs:26:8
2018-01-30 01:35:35 +00:00
|
2018-10-06 16:18:06 +00:00
26 | 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-10-06 16:18:06 +00:00
--> $DIR/double_comparison.rs:29:8
2018-01-30 01:35:35 +00:00
|
2018-10-06 16:18:06 +00:00
29 | 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-10-06 16:18:06 +00:00
--> $DIR/double_comparison.rs:32:8
2018-01-30 01:35:35 +00:00
|
2018-10-06 16:18:06 +00:00
32 | 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-10-06 16:18:06 +00:00
--> $DIR/double_comparison.rs:35:8
2018-01-30 01:35:35 +00:00
|
2018-10-06 16:18:06 +00:00
35 | if x >= y && x <= y {
2018-01-30 01:35:35 +00:00
| ^^^^^^^^^^^^^^^^ help: try: `x == y`
error: aborting due to 8 previous errors