@@ -91,7 +91,7 @@ LL | | };
9191 | |_____^ help: you can reduce it to: `a < b`
9292
9393error: this if-then-else expression returns a bool literal
94- --> $DIR/fixable.rs:105 :5
94+ --> $DIR/fixable.rs:112 :5
9595 |
9696LL | / if x {
9797LL | | return true;
@@ -101,7 +101,7 @@ LL | | };
101101 | |_____^ help: you can reduce it to: `return x`
102102
103103error: this if-then-else expression returns a bool literal
104- --> $DIR/fixable.rs:113 :5
104+ --> $DIR/fixable.rs:120 :5
105105 |
106106LL | / if x {
107107LL | | return false;
@@ -111,7 +111,7 @@ LL | | };
111111 | |_____^ help: you can reduce it to: `return !x`
112112
113113error: this if-then-else expression returns a bool literal
114- --> $DIR/fixable.rs:121 :5
114+ --> $DIR/fixable.rs:128 :5
115115 |
116116LL | / if x && y {
117117LL | | return true;
@@ -121,7 +121,7 @@ LL | | };
121121 | |_____^ help: you can reduce it to: `return x && y`
122122
123123error: this if-then-else expression returns a bool literal
124- --> $DIR/fixable.rs:129 :5
124+ --> $DIR/fixable.rs:136 :5
125125 |
126126LL | / if x && y {
127127LL | | return false;
@@ -131,33 +131,33 @@ LL | | };
131131 | |_____^ help: you can reduce it to: `return !(x && y)`
132132
133133error: equality checks against true are unnecessary
134- --> $DIR/fixable.rs:137 :8
134+ --> $DIR/fixable.rs:144 :8
135135 |
136136LL | if x == true {};
137137 | ^^^^^^^^^ help: try simplifying it as shown: `x`
138138 |
139139 = note: `-D clippy::bool-comparison` implied by `-D warnings`
140140
141141error: equality checks against false can be replaced by a negation
142- --> $DIR/fixable.rs:141 :8
142+ --> $DIR/fixable.rs:148 :8
143143 |
144144LL | if x == false {};
145145 | ^^^^^^^^^^ help: try simplifying it as shown: `!x`
146146
147147error: equality checks against true are unnecessary
148- --> $DIR/fixable.rs:151 :8
148+ --> $DIR/fixable.rs:158 :8
149149 |
150150LL | if x == true {};
151151 | ^^^^^^^^^ help: try simplifying it as shown: `x`
152152
153153error: equality checks against false can be replaced by a negation
154- --> $DIR/fixable.rs:152 :8
154+ --> $DIR/fixable.rs:159 :8
155155 |
156156LL | if x == false {};
157157 | ^^^^^^^^^^ help: try simplifying it as shown: `!x`
158158
159159error: this if-then-else expression returns a bool literal
160- --> $DIR/fixable.rs:161 :12
160+ --> $DIR/fixable.rs:168 :12
161161 |
162162LL | } else if returns_bool() {
163163 | ____________^
@@ -168,7 +168,7 @@ LL | | };
168168 | |_____^ help: you can reduce it to: `{ !returns_bool() }`
169169
170170error: this if-then-else expression returns a bool literal
171- --> $DIR/fixable.rs:174 :5
171+ --> $DIR/fixable.rs:181 :5
172172 |
173173LL | / if unsafe { no(4) } & 1 != 0 {
174174LL | | true
@@ -178,13 +178,13 @@ LL | | };
178178 | |_____^ help: you can reduce it to: `(unsafe { no(4) } & 1 != 0)`
179179
180180error: this if-then-else expression returns a bool literal
181- --> $DIR/fixable.rs:179 :30
181+ --> $DIR/fixable.rs:186 :30
182182 |
183183LL | let _brackets_unneeded = if unsafe { no(4) } & 1 != 0 { true } else { false };
184184 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can reduce it to: `unsafe { no(4) } & 1 != 0`
185185
186186error: this if-then-else expression returns a bool literal
187- --> $DIR/fixable.rs:182 :9
187+ --> $DIR/fixable.rs:189 :9
188188 |
189189LL | if unsafe { no(4) } & 1 != 0 { true } else { false }
190190 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can reduce it to: `(unsafe { no(4) } & 1 != 0)`
0 commit comments