]> git.lizzy.rs Git - rust.git/blob - clippy_tests/examples/bool_comparison.stderr
eabd3f9d1d0fac7f53bbc64e6577adae73fdbb84
[rust.git] / clippy_tests / examples / bool_comparison.stderr
1 error: equality checks against true are unnecessary
2  --> 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  --> bool_comparison.rs:8:8
11   |
12 8 |     if x == false { "yes" } else { "no" };
13   |        ^^^^^^^^^^ help: try simplifying it as shown: `!x`
14   |
15   = note: `-D bool-comparison` implied by `-D warnings`
16
17 error: equality checks against true are unnecessary
18  --> bool_comparison.rs:9:8
19   |
20 9 |     if true == x { "yes" } else { "no" };
21   |        ^^^^^^^^^ help: try simplifying it as shown: `x`
22   |
23   = note: `-D bool-comparison` implied by `-D warnings`
24
25 error: equality checks against false can be replaced by a negation
26   --> bool_comparison.rs:10:8
27    |
28 10 |     if false == x { "yes" } else { "no" };
29    |        ^^^^^^^^^^ help: try simplifying it as shown: `!x`
30    |
31    = note: `-D bool-comparison` implied by `-D warnings`
32
33 error: aborting due to previous error(s)
34
35 error: Could not compile `clippy_tests`.
36
37 To learn more, run the command again with --verbose.