1 error: this if-then-else expression returns a bool literal
2 --> $DIR/fixable.rs:41:5
9 | |_____^ help: you can reduce it to: `x`
11 = note: `-D clippy::needless-bool` implied by `-D warnings`
13 error: this if-then-else expression returns a bool literal
14 --> $DIR/fixable.rs:46:5
21 | |_____^ help: you can reduce it to: `!x`
23 error: this if-then-else expression returns a bool literal
24 --> $DIR/fixable.rs:51:5
31 | |_____^ help: you can reduce it to: `!(x && y)`
33 error: this if-then-else expression returns a bool literal
34 --> $DIR/fixable.rs:59:5
41 | |_____^ help: you can reduce it to: `a != b`
43 error: this if-then-else expression returns a bool literal
44 --> $DIR/fixable.rs:64:5
51 | |_____^ help: you can reduce it to: `a == b`
53 error: this if-then-else expression returns a bool literal
54 --> $DIR/fixable.rs:69:5
61 | |_____^ help: you can reduce it to: `a >= b`
63 error: this if-then-else expression returns a bool literal
64 --> $DIR/fixable.rs:74:5
71 | |_____^ help: you can reduce it to: `a > b`
73 error: this if-then-else expression returns a bool literal
74 --> $DIR/fixable.rs:79:5
81 | |_____^ help: you can reduce it to: `a <= b`
83 error: this if-then-else expression returns a bool literal
84 --> $DIR/fixable.rs:84:5
91 | |_____^ help: you can reduce it to: `a < b`
93 error: this if-then-else expression returns a bool literal
94 --> $DIR/fixable.rs:105:5
101 | |_____^ help: you can reduce it to: `return x`
103 error: this if-then-else expression returns a bool literal
104 --> $DIR/fixable.rs:113:5
111 | |_____^ help: you can reduce it to: `return !x`
113 error: this if-then-else expression returns a bool literal
114 --> $DIR/fixable.rs:121:5
121 | |_____^ help: you can reduce it to: `return x && y`
123 error: this if-then-else expression returns a bool literal
124 --> $DIR/fixable.rs:129:5
131 | |_____^ help: you can reduce it to: `return !(x && y)`
133 error: equality checks against true are unnecessary
134 --> $DIR/fixable.rs:137:8
136 LL | if x == true {};
137 | ^^^^^^^^^ help: try simplifying it as shown: `x`
139 = note: `-D clippy::bool-comparison` implied by `-D warnings`
141 error: equality checks against false can be replaced by a negation
142 --> $DIR/fixable.rs:141:8
144 LL | if x == false {};
145 | ^^^^^^^^^^ help: try simplifying it as shown: `!x`
147 error: equality checks against true are unnecessary
148 --> $DIR/fixable.rs:151:8
150 LL | if x == true {};
151 | ^^^^^^^^^ help: try simplifying it as shown: `x`
153 error: equality checks against false can be replaced by a negation
154 --> $DIR/fixable.rs:152:8
156 LL | if x == false {};
157 | ^^^^^^^^^^ help: try simplifying it as shown: `!x`
159 error: this if-then-else expression returns a bool literal
160 --> $DIR/fixable.rs:161:12
162 LL | } else if returns_bool() {
168 | |_____^ help: you can reduce it to: `{ !returns_bool() }`
170 error: this if-then-else expression returns a bool literal
171 --> $DIR/fixable.rs:174:5
173 LL | / if unsafe { no(4) } & 1 != 0 {
178 | |_____^ help: you can reduce it to: `(unsafe { no(4) } & 1 != 0)`
180 error: this if-then-else expression returns a bool literal
181 --> $DIR/fixable.rs:179:30
183 LL | let _brackets_unneeded = if unsafe { no(4) } & 1 != 0 { true } else { false };
184 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can reduce it to: `unsafe { no(4) } & 1 != 0`
186 error: this if-then-else expression returns a bool literal
187 --> $DIR/fixable.rs:182:9
189 LL | if unsafe { no(4) } & 1 != 0 { true } else { false }
190 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can reduce it to: `(unsafe { no(4) } & 1 != 0)`
192 error: aborting due to 21 previous errors