mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-12-24 12:03:28 +00:00
38d4ac7cea
Discussion previously happened in https://github.com/rust-lang/rust/pull/43498
88 lines
2.7 KiB
Text
88 lines
2.7 KiB
Text
error: equality checks against true are unnecessary
|
|
--> $DIR/bool_comparison.rs:4:8
|
|
|
|
|
LL | 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:9:8
|
|
|
|
|
LL | if x == false {
|
|
| ^^^^^^^^^^ help: try simplifying it as shown: `!x`
|
|
|
|
error: equality checks against true are unnecessary
|
|
--> $DIR/bool_comparison.rs:14:8
|
|
|
|
|
LL | 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:19:8
|
|
|
|
|
LL | 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:24:8
|
|
|
|
|
LL | if x != true {
|
|
| ^^^^^^^^^ help: try simplifying it as shown: `!x`
|
|
|
|
error: inequality checks against false are unnecessary
|
|
--> $DIR/bool_comparison.rs:29:8
|
|
|
|
|
LL | 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:34:8
|
|
|
|
|
LL | if true != x {
|
|
| ^^^^^^^^^ help: try simplifying it as shown: `!x`
|
|
|
|
error: inequality checks against false are unnecessary
|
|
--> $DIR/bool_comparison.rs:39:8
|
|
|
|
|
LL | if false != x {
|
|
| ^^^^^^^^^^ help: try simplifying it as shown: `x`
|
|
|
|
error: less than comparison against true can be replaced by a negation
|
|
--> $DIR/bool_comparison.rs:44:8
|
|
|
|
|
LL | if x < true {
|
|
| ^^^^^^^^ help: try simplifying it as shown: `!x`
|
|
|
|
error: greater than checks against false are unnecessary
|
|
--> $DIR/bool_comparison.rs:49:8
|
|
|
|
|
LL | if false < x {
|
|
| ^^^^^^^^^ help: try simplifying it as shown: `x`
|
|
|
|
error: greater than checks against false are unnecessary
|
|
--> $DIR/bool_comparison.rs:54:8
|
|
|
|
|
LL | if x > false {
|
|
| ^^^^^^^^^ help: try simplifying it as shown: `x`
|
|
|
|
error: less than comparison against true can be replaced by a negation
|
|
--> $DIR/bool_comparison.rs:59:8
|
|
|
|
|
LL | if true > x {
|
|
| ^^^^^^^^ help: try simplifying it as shown: `!x`
|
|
|
|
error: order comparisons between booleans can be simplified
|
|
--> $DIR/bool_comparison.rs:65:8
|
|
|
|
|
LL | if x < y {
|
|
| ^^^^^ help: try simplifying it as shown: `!x & y`
|
|
|
|
error: order comparisons between booleans can be simplified
|
|
--> $DIR/bool_comparison.rs:70:8
|
|
|
|
|
LL | if x > y {
|
|
| ^^^^^ help: try simplifying it as shown: `x & !y`
|
|
|
|
error: aborting due to 14 previous errors
|
|
|