rust-clippy/tests/ui/double_comparison.stderr

53 lines
1.5 KiB
Text

error: this binary expression can be simplified
--> tests/ui/double_comparison.rs:6:8
|
LL | if x == y || x < y {
| ^^^^^^^^^^^^^^^ help: try: `x <= y`
|
= note: `-D clippy::double-comparisons` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::double_comparisons)]`
error: this binary expression can be simplified
--> tests/ui/double_comparison.rs:9:8
|
LL | if x < y || x == y {
| ^^^^^^^^^^^^^^^ help: try: `x <= y`
error: this binary expression can be simplified
--> tests/ui/double_comparison.rs:12:8
|
LL | if x == y || x > y {
| ^^^^^^^^^^^^^^^ help: try: `x >= y`
error: this binary expression can be simplified
--> tests/ui/double_comparison.rs:15:8
|
LL | if x > y || x == y {
| ^^^^^^^^^^^^^^^ help: try: `x >= y`
error: this binary expression can be simplified
--> tests/ui/double_comparison.rs:18:8
|
LL | if x < y || x > y {
| ^^^^^^^^^^^^^^ help: try: `x != y`
error: this binary expression can be simplified
--> tests/ui/double_comparison.rs:21:8
|
LL | if x > y || x < y {
| ^^^^^^^^^^^^^^ help: try: `x != y`
error: this binary expression can be simplified
--> tests/ui/double_comparison.rs:24:8
|
LL | if x <= y && x >= y {
| ^^^^^^^^^^^^^^^^ help: try: `x == y`
error: this binary expression can be simplified
--> tests/ui/double_comparison.rs:27:8
|
LL | if x >= y && x <= y {
| ^^^^^^^^^^^^^^^^ help: try: `x == y`
error: aborting due to 8 previous errors