]> git.lizzy.rs Git - rust.git/blob - tests/ui/bool_comparison.stderr
Merge pull request #2984 from flip1995/single_char_pattern
[rust.git] / tests / ui / bool_comparison.stderr
1 error: equality checks against true are unnecessary
2  --> $DIR/bool_comparison.rs:7:8
3   |
4 7 |     if x == true { "yes" } else { "no" };
5   |        ^^^^^^^^^ help: try simplifying it as shown: `x`
6   |
7   = note: `-D bool-comparison` implied by `-D warnings`
8
9 error: equality checks against false can be replaced by a negation
10  --> $DIR/bool_comparison.rs:8:8
11   |
12 8 |     if x == false { "yes" } else { "no" };
13   |        ^^^^^^^^^^ help: try simplifying it as shown: `!x`
14
15 error: equality checks against true are unnecessary
16  --> $DIR/bool_comparison.rs:9:8
17   |
18 9 |     if true == x { "yes" } else { "no" };
19   |        ^^^^^^^^^ help: try simplifying it as shown: `x`
20
21 error: equality checks against false can be replaced by a negation
22   --> $DIR/bool_comparison.rs:10:8
23    |
24 10 |     if false == x { "yes" } else { "no" };
25    |        ^^^^^^^^^^ help: try simplifying it as shown: `!x`
26
27 error: aborting due to 4 previous errors
28