mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-24 05:33:27 +00:00
136 lines
4.2 KiB
Text
136 lines
4.2 KiB
Text
error: equality checks against true are unnecessary
|
|
--> $DIR/bool_comparison.rs:8: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:13:8
|
|
|
|
|
LL | if x == false {
|
|
| ^^^^^^^^^^ help: try simplifying it as shown: `!x`
|
|
|
|
error: equality checks against true are unnecessary
|
|
--> $DIR/bool_comparison.rs:18: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:23: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:28:8
|
|
|
|
|
LL | if x != true {
|
|
| ^^^^^^^^^ help: try simplifying it as shown: `!x`
|
|
|
|
error: inequality checks against false are unnecessary
|
|
--> $DIR/bool_comparison.rs:33: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:38:8
|
|
|
|
|
LL | if true != x {
|
|
| ^^^^^^^^^ help: try simplifying it as shown: `!x`
|
|
|
|
error: inequality checks against false are unnecessary
|
|
--> $DIR/bool_comparison.rs:43: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:48:8
|
|
|
|
|
LL | if x < true {
|
|
| ^^^^^^^^ help: try simplifying it as shown: `!x`
|
|
|
|
error: greater than checks against false are unnecessary
|
|
--> $DIR/bool_comparison.rs:53:8
|
|
|
|
|
LL | if false < x {
|
|
| ^^^^^^^^^ help: try simplifying it as shown: `x`
|
|
|
|
error: greater than checks against false are unnecessary
|
|
--> $DIR/bool_comparison.rs:58: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:63:8
|
|
|
|
|
LL | if true > x {
|
|
| ^^^^^^^^ help: try simplifying it as shown: `!x`
|
|
|
|
error: order comparisons between booleans can be simplified
|
|
--> $DIR/bool_comparison.rs:69: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:74:8
|
|
|
|
|
LL | if x > y {
|
|
| ^^^^^ help: try simplifying it as shown: `x & !y`
|
|
|
|
error: this comparison might be written more concisely
|
|
--> $DIR/bool_comparison.rs:122:8
|
|
|
|
|
LL | if a == !b {};
|
|
| ^^^^^^^ help: try simplifying it as shown: `a != b`
|
|
|
|
error: this comparison might be written more concisely
|
|
--> $DIR/bool_comparison.rs:123:8
|
|
|
|
|
LL | if !a == b {};
|
|
| ^^^^^^^ help: try simplifying it as shown: `a != b`
|
|
|
|
error: this comparison might be written more concisely
|
|
--> $DIR/bool_comparison.rs:127:8
|
|
|
|
|
LL | if b == !a {};
|
|
| ^^^^^^^ help: try simplifying it as shown: `b != a`
|
|
|
|
error: this comparison might be written more concisely
|
|
--> $DIR/bool_comparison.rs:128:8
|
|
|
|
|
LL | if !b == a {};
|
|
| ^^^^^^^ help: try simplifying it as shown: `b != a`
|
|
|
|
error: equality checks against false can be replaced by a negation
|
|
--> $DIR/bool_comparison.rs:152:8
|
|
|
|
|
LL | if false == m!(func) {}
|
|
| ^^^^^^^^^^^^^^^^^ help: try simplifying it as shown: `!m!(func)`
|
|
|
|
error: equality checks against false can be replaced by a negation
|
|
--> $DIR/bool_comparison.rs:153:8
|
|
|
|
|
LL | if m!(func) == false {}
|
|
| ^^^^^^^^^^^^^^^^^ help: try simplifying it as shown: `!m!(func)`
|
|
|
|
error: equality checks against true are unnecessary
|
|
--> $DIR/bool_comparison.rs:154:8
|
|
|
|
|
LL | if true == m!(func) {}
|
|
| ^^^^^^^^^^^^^^^^ help: try simplifying it as shown: `m!(func)`
|
|
|
|
error: equality checks against true are unnecessary
|
|
--> $DIR/bool_comparison.rs:155:8
|
|
|
|
|
LL | if m!(func) == true {}
|
|
| ^^^^^^^^^^^^^^^^ help: try simplifying it as shown: `m!(func)`
|
|
|
|
error: aborting due to 22 previous errors
|
|
|