1 error: this if-then-else expression will always return true
2 --> $DIR/needless_bool.rs:19:5
4 19 | 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:20:5
12 20 | if x { false } else { false };
13 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
15 error: this if-then-else expression returns a bool literal
16 --> $DIR/needless_bool.rs:21:5
18 21 | 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:22:5
24 22 | 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:23:5
30 23 | 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:35:5
36 35 | if x { return true } else { return true };
37 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
39 error: this if-then-else expression will always return false
40 --> $DIR/needless_bool.rs:40:5
42 40 | if x { return false } else { return false };
43 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
45 error: this if-then-else expression returns a bool literal
46 --> $DIR/needless_bool.rs:45:5
48 45 | 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:50:5
54 50 | 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:55:5
60 55 | 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:60:5
66 60 | if x && y { return false } else { return true };
67 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can reduce it to: `return !(x && y)`
69 error: aborting due to 11 previous errors