1 error: this if-then-else expression will always return true
2 --> $DIR/needless_bool.rs:9:5
4 9 | if x { true } else { true };
5 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
7 note: lint level defined here
8 --> $DIR/needless_bool.rs:3:9
10 3 | #![deny(needless_bool)]
13 error: this if-then-else expression will always return false
14 --> $DIR/needless_bool.rs:10:5
16 10 | if x { false } else { false };
17 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
19 error: this if-then-else expression returns a bool literal
20 --> $DIR/needless_bool.rs:11:5
22 11 | if x { true } else { false };
23 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
25 help: you can reduce it to
28 error: this if-then-else expression returns a bool literal
29 --> $DIR/needless_bool.rs:15:5
31 15 | if x { false } else { true };
32 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
34 help: you can reduce it to
37 error: this if-then-else expression returns a bool literal
38 --> $DIR/needless_bool.rs:19:5
40 19 | if x && y { false } else { true };
41 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
43 help: you can reduce it to
46 error: this if-then-else expression will always return true
47 --> $DIR/needless_bool.rs:34:5
49 34 | if x { return true } else { return true };
50 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
52 error: this if-then-else expression will always return false
53 --> $DIR/needless_bool.rs:40:5
55 40 | if x { return false } else { return false };
56 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
58 error: this if-then-else expression returns a bool literal
59 --> $DIR/needless_bool.rs:46:5
61 46 | if x { return true } else { return false };
62 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
64 help: you can reduce it to
67 error: this if-then-else expression returns a bool literal
68 --> $DIR/needless_bool.rs:54:5
70 54 | if x && y { return true } else { return false };
71 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
73 help: you can reduce it to
76 error: this if-then-else expression returns a bool literal
77 --> $DIR/needless_bool.rs:62:5
79 62 | if x { return false } else { return true };
80 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
82 help: you can reduce it to
85 error: this if-then-else expression returns a bool literal
86 --> $DIR/needless_bool.rs:70:5
88 70 | if x && y { return false } else { return true };
89 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
91 help: you can reduce it to
94 error: aborting due to 11 previous errors