mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 16:24:46 +00:00
53 lines
1.6 KiB
Plaintext
53 lines
1.6 KiB
Plaintext
error: equality checks against true are unnecessary
|
|
--> $DIR/bool_comparison.rs:13:8
|
|
|
|
|
13 | if x == true {
|
|
| ^^^^^^^^^ help: try simplifying it as shown: `x`
|
|
|
|
|
= note: `-D clippy::bool-comparison` implied by `-D warnings`
|
|
|
|
error: equality checks against false can be replaced by a negation
|
|
--> $DIR/bool_comparison.rs:18:8
|
|
|
|
|
18 | if x == false {
|
|
| ^^^^^^^^^^ help: try simplifying it as shown: `!x`
|
|
|
|
error: equality checks against true are unnecessary
|
|
--> $DIR/bool_comparison.rs:23:8
|
|
|
|
|
23 | if true == x {
|
|
| ^^^^^^^^^ help: try simplifying it as shown: `x`
|
|
|
|
error: equality checks against false can be replaced by a negation
|
|
--> $DIR/bool_comparison.rs:28:8
|
|
|
|
|
28 | if false == x {
|
|
| ^^^^^^^^^^ help: try simplifying it as shown: `!x`
|
|
|
|
error: inequality checks against true can be replaced by a negation
|
|
--> $DIR/bool_comparison.rs:33:8
|
|
|
|
|
33 | if x != true {
|
|
| ^^^^^^^^^ help: try simplifying it as shown: `!x`
|
|
|
|
error: inequality checks against false are unnecessary
|
|
--> $DIR/bool_comparison.rs:38:8
|
|
|
|
|
38 | if x != false {
|
|
| ^^^^^^^^^^ help: try simplifying it as shown: `x`
|
|
|
|
error: inequality checks against true can be replaced by a negation
|
|
--> $DIR/bool_comparison.rs:43:8
|
|
|
|
|
43 | if true != x {
|
|
| ^^^^^^^^^ help: try simplifying it as shown: `!x`
|
|
|
|
error: inequality checks against false are unnecessary
|
|
--> $DIR/bool_comparison.rs:48:8
|
|
|
|
|
48 | if false != x {
|
|
| ^^^^^^^^^^ help: try simplifying it as shown: `x`
|
|
|
|
error: aborting due to 8 previous errors
|
|
|