rust-clippy/tests/ui/bool_comparison.stderr

89 lines
2.7 KiB
Text
Raw Normal View History

error: equality checks against true are unnecessary
2018-12-10 05:27:19 +00:00
--> $DIR/bool_comparison.rs:13: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`
error: equality checks against false can be replaced by a negation
2018-10-06 16:18:06 +00:00
--> $DIR/bool_comparison.rs:18:8
|
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`
error: equality checks against true are unnecessary
2018-12-10 05:27:19 +00:00
--> $DIR/bool_comparison.rs:23: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`
error: equality checks against false can be replaced by a negation
2018-12-10 05:27:19 +00:00
--> $DIR/bool_comparison.rs:28:8
|
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`
error: inequality checks against true can be replaced by a negation
2018-12-10 05:27:19 +00:00
--> $DIR/bool_comparison.rs:33:8
|
2018-12-27 15:57:55 +00:00
LL | if x != true {
| ^^^^^^^^^ help: try simplifying it as shown: `!x`
error: inequality checks against false are unnecessary
2018-12-10 05:27:19 +00:00
--> $DIR/bool_comparison.rs:38:8
|
2018-12-27 15:57:55 +00:00
LL | if x != false {
| ^^^^^^^^^^ help: try simplifying it as shown: `x`
error: inequality checks against true can be replaced by a negation
2018-12-10 05:27:19 +00:00
--> $DIR/bool_comparison.rs:43:8
|
2018-12-27 15:57:55 +00:00
LL | if true != x {
| ^^^^^^^^^ help: try simplifying it as shown: `!x`
error: inequality checks against false are unnecessary
2018-12-10 05:27:19 +00:00
--> $DIR/bool_comparison.rs:48:8
|
2018-12-27 15:57:55 +00: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:53:8
|
2018-12-27 15:57:55 +00:00
LL | if x < true {
| ^^^^^^^^ help: try simplifying it as shown: `!x`
error: greater than checks against false are unnecessary
--> $DIR/bool_comparison.rs:58:8
|
2018-12-27 15:57:55 +00:00
LL | if false < x {
| ^^^^^^^^^ help: try simplifying it as shown: `x`
error: greater than checks against false are unnecessary
--> $DIR/bool_comparison.rs:63:8
|
2018-12-27 15:57:55 +00: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:68:8
|
2018-12-27 15:57:55 +00:00
LL | if true > x {
| ^^^^^^^^ help: try simplifying it as shown: `!x`
error: order comparisons between booleans can be simplified
--> $DIR/bool_comparison.rs:74:8
|
2018-12-27 15:57:55 +00: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:79:8
|
2018-12-27 15:57:55 +00:00
LL | if x > y {
| ^^^^^ help: try simplifying it as shown: `x & !y`
error: aborting due to 14 previous errors
2018-01-16 16:06:27 +00:00