@@ -108,7 +108,31 @@ LL + Some(0) => ..,
108108 |
109109
110110error: redundant guard
111- --> $DIR/redundant_guards.rs:165:28
111+ --> $DIR/redundant_guards.rs:122:14
112+ |
113+ LL | i if i == -1 => {},
114+ | ^^^^^^^
115+ |
116+ help: try
117+ |
118+ LL - i if i == -1 => {},
119+ LL + -1 => {},
120+ |
121+
122+ error: redundant guard
123+ --> $DIR/redundant_guards.rs:123:14
124+ |
125+ LL | i if i == 1 => {},
126+ | ^^^^^^
127+ |
128+ help: try
129+ |
130+ LL - i if i == 1 => {},
131+ LL + 1 => {},
132+ |
133+
134+ error: redundant guard
135+ --> $DIR/redundant_guards.rs:173:28
112136 |
113137LL | Some(ref x) if x == &1 => {},
114138 | ^^^^^^^
@@ -120,7 +144,7 @@ LL + Some(1) => {},
120144 |
121145
122146error: redundant guard
123- --> $DIR/redundant_guards.rs:166 :28
147+ --> $DIR/redundant_guards.rs:174 :28
124148 |
125149LL | Some(ref x) if &1 == x => {},
126150 | ^^^^^^^
@@ -132,7 +156,7 @@ LL + Some(1) => {},
132156 |
133157
134158error: redundant guard
135- --> $DIR/redundant_guards.rs:167 :28
159+ --> $DIR/redundant_guards.rs:175 :28
136160 |
137161LL | Some(ref x) if let &2 = x => {},
138162 | ^^^^^^^^^^
@@ -144,7 +168,7 @@ LL + Some(2) => {},
144168 |
145169
146170error: redundant guard
147- --> $DIR/redundant_guards.rs:168 :28
171+ --> $DIR/redundant_guards.rs:176 :28
148172 |
149173LL | Some(ref x) if matches!(x, &3) => {},
150174 | ^^^^^^^^^^^^^^^
@@ -156,7 +180,7 @@ LL + Some(3) => {},
156180 |
157181
158182error: redundant guard
159- --> $DIR/redundant_guards.rs:188 :32
183+ --> $DIR/redundant_guards.rs:196 :32
160184 |
161185LL | B { ref c, .. } if c == &1 => {},
162186 | ^^^^^^^
@@ -168,7 +192,7 @@ LL + B { c: 1, .. } => {},
168192 |
169193
170194error: redundant guard
171- --> $DIR/redundant_guards.rs:189 :32
195+ --> $DIR/redundant_guards.rs:197 :32
172196 |
173197LL | B { ref c, .. } if &1 == c => {},
174198 | ^^^^^^^
@@ -180,7 +204,7 @@ LL + B { c: 1, .. } => {},
180204 |
181205
182206error: redundant guard
183- --> $DIR/redundant_guards.rs:190 :32
207+ --> $DIR/redundant_guards.rs:198 :32
184208 |
185209LL | B { ref c, .. } if let &1 = c => {},
186210 | ^^^^^^^^^^
@@ -192,7 +216,7 @@ LL + B { c: 1, .. } => {},
192216 |
193217
194218error: redundant guard
195- --> $DIR/redundant_guards.rs:191 :32
219+ --> $DIR/redundant_guards.rs:199 :32
196220 |
197221LL | B { ref c, .. } if matches!(c, &1) => {},
198222 | ^^^^^^^^^^^^^^^
@@ -204,7 +228,7 @@ LL + B { c: 1, .. } => {},
204228 |
205229
206230error: redundant guard
207- --> $DIR/redundant_guards.rs:201 :26
231+ --> $DIR/redundant_guards.rs:209 :26
208232 |
209233LL | Some(Some(x)) if x.is_empty() => {},
210234 | ^^^^^^^^^^^^
@@ -216,7 +240,7 @@ LL + Some(Some("")) => {},
216240 |
217241
218242error: redundant guard
219- --> $DIR/redundant_guards.rs:212 :26
243+ --> $DIR/redundant_guards.rs:220 :26
220244 |
221245LL | Some(Some(x)) if x.is_empty() => {},
222246 | ^^^^^^^^^^^^
@@ -228,7 +252,7 @@ LL + Some(Some([])) => {},
228252 |
229253
230254error: redundant guard
231- --> $DIR/redundant_guards.rs:217 :26
255+ --> $DIR/redundant_guards.rs:225 :26
232256 |
233257LL | Some(Some(x)) if x.is_empty() => {},
234258 | ^^^^^^^^^^^^
@@ -240,7 +264,7 @@ LL + Some(Some([])) => {},
240264 |
241265
242266error: redundant guard
243- --> $DIR/redundant_guards.rs:228 :26
267+ --> $DIR/redundant_guards.rs:236 :26
244268 |
245269LL | Some(Some(x)) if x.starts_with(&[]) => {},
246270 | ^^^^^^^^^^^^^^^^^^
@@ -252,7 +276,7 @@ LL + Some(Some([..])) => {},
252276 |
253277
254278error: redundant guard
255- --> $DIR/redundant_guards.rs:233 :26
279+ --> $DIR/redundant_guards.rs:241 :26
256280 |
257281LL | Some(Some(x)) if x.starts_with(&[1]) => {},
258282 | ^^^^^^^^^^^^^^^^^^^
@@ -264,7 +288,7 @@ LL + Some(Some([1, ..])) => {},
264288 |
265289
266290error: redundant guard
267- --> $DIR/redundant_guards.rs:238 :26
291+ --> $DIR/redundant_guards.rs:246 :26
268292 |
269293LL | Some(Some(x)) if x.starts_with(&[1, 2]) => {},
270294 | ^^^^^^^^^^^^^^^^^^^^^^
@@ -276,7 +300,7 @@ LL + Some(Some([1, 2, ..])) => {},
276300 |
277301
278302error: redundant guard
279- --> $DIR/redundant_guards.rs:243 :26
303+ --> $DIR/redundant_guards.rs:251 :26
280304 |
281305LL | Some(Some(x)) if x.ends_with(&[1, 2]) => {},
282306 | ^^^^^^^^^^^^^^^^^^^^
@@ -287,5 +311,5 @@ LL - Some(Some(x)) if x.ends_with(&[1, 2]) => {},
287311LL + Some(Some([.., 1, 2])) => {},
288312 |
289313
290- error: aborting due to 24 previous errors
314+ error: aborting due to 26 previous errors
291315
0 commit comments