rust/tests/ui/bool_comparison.stderr

113 lines
3.4 KiB
Plaintext
Raw Normal View History

error: equality checks against true are unnecessary
--> $DIR/bool_comparison.rs:6:8
2018-10-06 11:18:06 -05:00
|
2018-12-27 09:57:55 -06:00
LL | if x == true {
2018-10-06 11:18:06 -05:00
| ^^^^^^^^^ 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:11:8
2018-10-06 11:18:06 -05:00
|
2018-12-27 09:57:55 -06:00
LL | if x == false {
2018-10-06 11:18:06 -05:00
| ^^^^^^^^^^ help: try simplifying it as shown: `!x`
error: equality checks against true are unnecessary
--> $DIR/bool_comparison.rs:16:8
2018-10-06 11:18:06 -05:00
|
2018-12-27 09:57:55 -06:00
LL | if true == x {
2018-10-06 11:18:06 -05:00
| ^^^^^^^^^ help: try simplifying it as shown: `x`
error: equality checks against false can be replaced by a negation
--> $DIR/bool_comparison.rs:21:8
|
2018-12-27 09:57:55 -06:00
LL | if false == x {
2017-07-24 09:28:41 -05:00
| ^^^^^^^^^^ help: try simplifying it as shown: `!x`
error: inequality checks against true can be replaced by a negation
--> $DIR/bool_comparison.rs:26:8
|
2018-12-27 09:57:55 -06:00
LL | if x != true {
| ^^^^^^^^^ help: try simplifying it as shown: `!x`
error: inequality checks against false are unnecessary
--> $DIR/bool_comparison.rs:31:8
|
2018-12-27 09:57:55 -06:00
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:36:8
|
2018-12-27 09:57:55 -06:00
LL | if true != x {
| ^^^^^^^^^ help: try simplifying it as shown: `!x`
error: inequality checks against false are unnecessary
--> $DIR/bool_comparison.rs:41:8
|
2018-12-27 09:57:55 -06:00
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:46:8
|
2018-12-27 09:57:55 -06:00
LL | if x < true {
| ^^^^^^^^ help: try simplifying it as shown: `!x`
error: greater than checks against false are unnecessary
--> $DIR/bool_comparison.rs:51:8
|
2018-12-27 09:57:55 -06:00
LL | if false < x {
| ^^^^^^^^^ help: try simplifying it as shown: `x`
error: greater than checks against false are unnecessary
--> $DIR/bool_comparison.rs:56:8
|
2018-12-27 09:57:55 -06:00
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:61:8
|
2018-12-27 09:57:55 -06:00
LL | if true > x {
| ^^^^^^^^ help: try simplifying it as shown: `!x`
error: order comparisons between booleans can be simplified
--> $DIR/bool_comparison.rs:67:8
|
2018-12-27 09:57:55 -06:00
LL | if x < y {
| ^^^^^ help: try simplifying it as shown: `!x & y`
error: order comparisons between booleans can be simplified
--> $DIR/bool_comparison.rs:72:8
|
2018-12-27 09:57:55 -06:00
LL | if x > y {
| ^^^^^ help: try simplifying it as shown: `x & !y`
2020-03-23 15:00:02 -05:00
error: This comparison might be written more concisely
2020-03-23 15:21:18 -05:00
--> $DIR/bool_comparison.rs:120:8
2020-03-23 14:29:12 -05:00
|
LL | if a == !b {};
2020-03-23 15:00:02 -05:00
| ^^^^^^^ help: try simplifying it as shown: `a != b`
2020-03-23 14:29:12 -05:00
2020-03-23 15:00:02 -05:00
error: This comparison might be written more concisely
2020-03-23 15:21:18 -05:00
--> $DIR/bool_comparison.rs:121:8
2020-03-23 14:29:12 -05:00
|
LL | if !a == b {};
2020-03-23 15:00:02 -05:00
| ^^^^^^^ help: try simplifying it as shown: `a != b`
2020-03-23 14:29:12 -05:00
2020-03-23 15:21:18 -05:00
error: This comparison might be written more concisely
--> $DIR/bool_comparison.rs:125: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:126:8
|
LL | if !b == a {};
| ^^^^^^^ help: try simplifying it as shown: `b != a`
error: aborting due to 18 previous errors
2018-01-16 10:06:27 -06:00