2017-02-07 20:05:30 +00:00
|
|
|
error: equality checks against true are unnecessary
|
2023-08-24 19:32:12 +00:00
|
|
|
--> $DIR/bool_comparison.rs:7:8
|
2018-10-06 16:18:06 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | if x == true {
|
2018-10-06 16:18:06 +00:00
|
|
|
| ^^^^^^^^^ help: try simplifying it as shown: `x`
|
|
|
|
|
|
|
|
|
= note: `-D clippy::bool-comparison` implied by `-D warnings`
|
2023-08-01 12:02:21 +00:00
|
|
|
= help: to override `-D warnings` add `#[allow(clippy::bool_comparison)]`
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
|
|
error: equality checks against false can be replaced by a negation
|
2023-08-24 19:32:12 +00:00
|
|
|
--> $DIR/bool_comparison.rs:12:8
|
2018-10-06 16:18:06 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | if x == false {
|
2018-10-06 16:18:06 +00:00
|
|
|
| ^^^^^^^^^^ help: try simplifying it as shown: `!x`
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
|
|
error: equality checks against true are unnecessary
|
2023-08-24 19:32:12 +00:00
|
|
|
--> $DIR/bool_comparison.rs:17:8
|
2018-10-06 16:18:06 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | if true == x {
|
2018-10-06 16:18:06 +00:00
|
|
|
| ^^^^^^^^^ help: try simplifying it as shown: `x`
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
|
|
error: equality checks against false can be replaced by a negation
|
2023-08-24 19:32:12 +00:00
|
|
|
--> $DIR/bool_comparison.rs:22:8
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | if false == x {
|
2017-07-24 14:28:41 +00:00
|
|
|
| ^^^^^^^^^^ help: try simplifying it as shown: `!x`
|
2017-02-07 20:05:30 +00:00
|
|
|
|
2018-11-30 13:21:11 +00:00
|
|
|
error: inequality checks against true can be replaced by a negation
|
2023-08-24 19:32:12 +00:00
|
|
|
--> $DIR/bool_comparison.rs:27:8
|
2018-11-30 13:21:11 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | if x != true {
|
2018-11-30 13:21:11 +00:00
|
|
|
| ^^^^^^^^^ help: try simplifying it as shown: `!x`
|
|
|
|
|
|
|
|
error: inequality checks against false are unnecessary
|
2023-08-24 19:32:12 +00:00
|
|
|
--> $DIR/bool_comparison.rs:32:8
|
2018-11-30 13:21:11 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | if x != false {
|
2018-11-30 13:21:11 +00:00
|
|
|
| ^^^^^^^^^^ help: try simplifying it as shown: `x`
|
|
|
|
|
|
|
|
error: inequality checks against true can be replaced by a negation
|
2023-08-24 19:32:12 +00:00
|
|
|
--> $DIR/bool_comparison.rs:37:8
|
2018-11-30 13:21:11 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | if true != x {
|
2018-11-30 13:21:11 +00:00
|
|
|
| ^^^^^^^^^ help: try simplifying it as shown: `!x`
|
|
|
|
|
|
|
|
error: inequality checks against false are unnecessary
|
2023-08-24 19:32:12 +00:00
|
|
|
--> $DIR/bool_comparison.rs:42:8
|
2018-11-30 13:21:11 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | if false != x {
|
2018-11-30 13:21:11 +00:00
|
|
|
| ^^^^^^^^^^ help: try simplifying it as shown: `x`
|
|
|
|
|
2018-12-07 00:50:16 +00:00
|
|
|
error: less than comparison against true can be replaced by a negation
|
2023-08-24 19:32:12 +00:00
|
|
|
--> $DIR/bool_comparison.rs:47:8
|
2018-12-07 00:50:16 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | if x < true {
|
2018-12-07 00:50:16 +00:00
|
|
|
| ^^^^^^^^ help: try simplifying it as shown: `!x`
|
|
|
|
|
|
|
|
error: greater than checks against false are unnecessary
|
2023-08-24 19:32:12 +00:00
|
|
|
--> $DIR/bool_comparison.rs:52:8
|
2018-12-07 00:50:16 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | if false < x {
|
2018-12-07 00:50:16 +00:00
|
|
|
| ^^^^^^^^^ help: try simplifying it as shown: `x`
|
|
|
|
|
|
|
|
error: greater than checks against false are unnecessary
|
2023-08-24 19:32:12 +00:00
|
|
|
--> $DIR/bool_comparison.rs:57:8
|
2018-12-07 00:50:16 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | if x > false {
|
2018-12-07 00:50:16 +00:00
|
|
|
| ^^^^^^^^^ help: try simplifying it as shown: `x`
|
|
|
|
|
|
|
|
error: less than comparison against true can be replaced by a negation
|
2023-08-24 19:32:12 +00:00
|
|
|
--> $DIR/bool_comparison.rs:62:8
|
2018-12-07 00:50:16 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | if true > x {
|
2018-12-07 00:50:16 +00:00
|
|
|
| ^^^^^^^^ help: try simplifying it as shown: `!x`
|
|
|
|
|
|
|
|
error: order comparisons between booleans can be simplified
|
2023-08-24 19:32:12 +00:00
|
|
|
--> $DIR/bool_comparison.rs:68:8
|
2018-12-07 00:50:16 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | if x < y {
|
2018-12-17 18:32:24 +00:00
|
|
|
| ^^^^^ help: try simplifying it as shown: `!x & y`
|
2018-12-07 00:50:16 +00:00
|
|
|
|
|
|
|
error: order comparisons between booleans can be simplified
|
2023-08-24 19:32:12 +00:00
|
|
|
--> $DIR/bool_comparison.rs:73:8
|
2018-12-07 00:50:16 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | if x > y {
|
2018-12-17 18:32:24 +00:00
|
|
|
| ^^^^^ help: try simplifying it as shown: `x & !y`
|
2018-12-07 00:50:16 +00:00
|
|
|
|
2020-08-11 13:43:21 +00:00
|
|
|
error: this comparison might be written more concisely
|
2023-08-24 19:32:12 +00:00
|
|
|
--> $DIR/bool_comparison.rs:121:8
|
2020-03-23 19:29:12 +00:00
|
|
|
|
|
|
|
|
LL | if a == !b {};
|
2020-03-23 20:00:02 +00:00
|
|
|
| ^^^^^^^ help: try simplifying it as shown: `a != b`
|
2020-03-23 19:29:12 +00:00
|
|
|
|
2020-08-11 13:43:21 +00:00
|
|
|
error: this comparison might be written more concisely
|
2023-08-24 19:32:12 +00:00
|
|
|
--> $DIR/bool_comparison.rs:122:8
|
2020-03-23 19:29:12 +00:00
|
|
|
|
|
|
|
|
LL | if !a == b {};
|
2020-03-23 20:00:02 +00:00
|
|
|
| ^^^^^^^ help: try simplifying it as shown: `a != b`
|
2020-03-23 19:29:12 +00:00
|
|
|
|
2020-08-11 13:43:21 +00:00
|
|
|
error: this comparison might be written more concisely
|
2023-08-24 19:32:12 +00:00
|
|
|
--> $DIR/bool_comparison.rs:126:8
|
2020-03-23 20:21:18 +00:00
|
|
|
|
|
|
|
|
LL | if b == !a {};
|
|
|
|
| ^^^^^^^ help: try simplifying it as shown: `b != a`
|
|
|
|
|
2020-08-11 13:43:21 +00:00
|
|
|
error: this comparison might be written more concisely
|
2023-08-24 19:32:12 +00:00
|
|
|
--> $DIR/bool_comparison.rs:127:8
|
2020-03-23 20:21:18 +00:00
|
|
|
|
|
|
|
|
LL | if !b == a {};
|
|
|
|
| ^^^^^^^ help: try simplifying it as shown: `b != a`
|
|
|
|
|
2020-10-28 22:36:07 +00:00
|
|
|
error: equality checks against false can be replaced by a negation
|
2023-08-24 19:32:12 +00:00
|
|
|
--> $DIR/bool_comparison.rs:151:8
|
2020-10-28 22:36:07 +00:00
|
|
|
|
|
|
|
|
LL | if false == m!(func) {}
|
|
|
|
| ^^^^^^^^^^^^^^^^^ help: try simplifying it as shown: `!m!(func)`
|
|
|
|
|
|
|
|
error: equality checks against false can be replaced by a negation
|
2023-08-24 19:32:12 +00:00
|
|
|
--> $DIR/bool_comparison.rs:152:8
|
2020-10-28 22:36:07 +00:00
|
|
|
|
|
|
|
|
LL | if m!(func) == false {}
|
|
|
|
| ^^^^^^^^^^^^^^^^^ help: try simplifying it as shown: `!m!(func)`
|
|
|
|
|
|
|
|
error: equality checks against true are unnecessary
|
2023-08-24 19:32:12 +00:00
|
|
|
--> $DIR/bool_comparison.rs:153:8
|
2020-10-28 22:36:07 +00:00
|
|
|
|
|
|
|
|
LL | if true == m!(func) {}
|
|
|
|
| ^^^^^^^^^^^^^^^^ help: try simplifying it as shown: `m!(func)`
|
|
|
|
|
|
|
|
error: equality checks against true are unnecessary
|
2023-08-24 19:32:12 +00:00
|
|
|
--> $DIR/bool_comparison.rs:154:8
|
2020-10-28 22:36:07 +00:00
|
|
|
|
|
|
|
|
LL | if m!(func) == true {}
|
|
|
|
| ^^^^^^^^^^^^^^^^ help: try simplifying it as shown: `m!(func)`
|
|
|
|
|
2023-12-21 10:20:25 +00:00
|
|
|
error: equality checks against false can be replaced by a negation
|
|
|
|
--> $DIR/bool_comparison.rs:171:14
|
|
|
|
|
|
|
|
|
LL | let _ = ((1 < 2) == false) as usize;
|
|
|
|
| ^^^^^^^^^^^^^^^^ help: try simplifying it as shown: `1 >= 2`
|
|
|
|
|
|
|
|
error: equality checks against false can be replaced by a negation
|
|
|
|
--> $DIR/bool_comparison.rs:172:14
|
|
|
|
|
|
|
|
|
LL | let _ = (false == m!(func)) as usize;
|
|
|
|
| ^^^^^^^^^^^^^^^^^ help: try simplifying it as shown: `!m!(func)`
|
|
|
|
|
|
|
|
error: this comparison might be written more concisely
|
|
|
|
--> $DIR/bool_comparison.rs:175:14
|
|
|
|
|
|
|
|
|
LL | let _ = ((1 < 2) == !m!(func)) as usize;
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^ help: try simplifying it as shown: `(1 < 2) != m!(func)`
|
|
|
|
|
|
|
|
error: aborting due to 25 previous errors
|
2018-01-16 16:06:27 +00:00
|
|
|
|