1 error: this if-then-else expression will always return true
2 --> $DIR/needless_bool.rs:41:5
4 41 | if x { true } else { true };
5 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
7 = note: `-D clippy::needless-bool` implied by `-D warnings`
9 error: this if-then-else expression will always return false
10 --> $DIR/needless_bool.rs:42:5
12 42 | if x { false } else { false };
13 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
15 error: this if-then-else expression returns a bool literal
16 --> $DIR/needless_bool.rs:43:5
18 43 | if x { true } else { false };
19 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can reduce it to: `x`
21 error: this if-then-else expression returns a bool literal
22 --> $DIR/needless_bool.rs:44:5
24 44 | if x { false } else { true };
25 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can reduce it to: `!x`
27 error: this if-then-else expression returns a bool literal
28 --> $DIR/needless_bool.rs:45:5
30 45 | if x && y { false } else { true };
31 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can reduce it to: `!(x && y)`
33 error: this if-then-else expression will always return true
34 --> $DIR/needless_bool.rs:60:5
36 60 | if x { return true } else { return true };
37 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
39 error: this if-then-else expression will always return false
40 --> $DIR/needless_bool.rs:65:5
42 65 | if x { return false } else { return false };
43 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
45 error: this if-then-else expression returns a bool literal
46 --> $DIR/needless_bool.rs:70:5
48 70 | if x { return true } else { return false };
49 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can reduce it to: `return x`
51 error: this if-then-else expression returns a bool literal
52 --> $DIR/needless_bool.rs:75:5
54 75 | if x && y { return true } else { return false };
55 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can reduce it to: `return x && y`
57 error: this if-then-else expression returns a bool literal
58 --> $DIR/needless_bool.rs:80:5
60 80 | if x { return false } else { return true };
61 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can reduce it to: `return !x`
63 error: this if-then-else expression returns a bool literal
64 --> $DIR/needless_bool.rs:85:5
66 85 | if x && y { return false } else { return true };
67 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can reduce it to: `return !(x && y)`
69 error: equality checks against true are unnecessary
70 --> $DIR/needless_bool.rs:89:7
72 89 | if x == true { };
73 | ^^^^^^^^^^ help: try simplifying it as shown: `x`
75 = note: `-D clippy::bool-comparison` implied by `-D warnings`
77 error: equality checks against false can be replaced by a negation
78 --> $DIR/needless_bool.rs:93:7
80 93 | if x == false { };
81 | ^^^^^^^^^^^ help: try simplifying it as shown: `!x`
83 error: equality checks against true are unnecessary
84 --> $DIR/needless_bool.rs:104:8
86 104 | if x == true { };
87 | ^^^^^^^^^ help: try simplifying it as shown: `x`
89 error: equality checks against false can be replaced by a negation
90 --> $DIR/needless_bool.rs:105:8
92 105 | if x == false { };
93 | ^^^^^^^^^^ help: try simplifying it as shown: `!x`
95 error: aborting due to 15 previous errors