@@ -108,7 +108,31 @@ LL + Some(0) => ..,
108
108
|
109
109
110
110
error: 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
112
136
|
113
137
LL | Some(ref x) if x == &1 => {},
114
138
| ^^^^^^^
@@ -120,7 +144,7 @@ LL + Some(1) => {},
120
144
|
121
145
122
146
error: redundant guard
123
- --> $DIR/redundant_guards.rs:166 :28
147
+ --> $DIR/redundant_guards.rs:174 :28
124
148
|
125
149
LL | Some(ref x) if &1 == x => {},
126
150
| ^^^^^^^
@@ -132,7 +156,7 @@ LL + Some(1) => {},
132
156
|
133
157
134
158
error: redundant guard
135
- --> $DIR/redundant_guards.rs:167 :28
159
+ --> $DIR/redundant_guards.rs:175 :28
136
160
|
137
161
LL | Some(ref x) if let &2 = x => {},
138
162
| ^^^^^^^^^^
@@ -144,7 +168,7 @@ LL + Some(2) => {},
144
168
|
145
169
146
170
error: redundant guard
147
- --> $DIR/redundant_guards.rs:168 :28
171
+ --> $DIR/redundant_guards.rs:176 :28
148
172
|
149
173
LL | Some(ref x) if matches!(x, &3) => {},
150
174
| ^^^^^^^^^^^^^^^
@@ -156,7 +180,7 @@ LL + Some(3) => {},
156
180
|
157
181
158
182
error: redundant guard
159
- --> $DIR/redundant_guards.rs:188 :32
183
+ --> $DIR/redundant_guards.rs:196 :32
160
184
|
161
185
LL | B { ref c, .. } if c == &1 => {},
162
186
| ^^^^^^^
@@ -168,7 +192,7 @@ LL + B { c: 1, .. } => {},
168
192
|
169
193
170
194
error: redundant guard
171
- --> $DIR/redundant_guards.rs:189 :32
195
+ --> $DIR/redundant_guards.rs:197 :32
172
196
|
173
197
LL | B { ref c, .. } if &1 == c => {},
174
198
| ^^^^^^^
@@ -180,7 +204,7 @@ LL + B { c: 1, .. } => {},
180
204
|
181
205
182
206
error: redundant guard
183
- --> $DIR/redundant_guards.rs:190 :32
207
+ --> $DIR/redundant_guards.rs:198 :32
184
208
|
185
209
LL | B { ref c, .. } if let &1 = c => {},
186
210
| ^^^^^^^^^^
@@ -192,7 +216,7 @@ LL + B { c: 1, .. } => {},
192
216
|
193
217
194
218
error: redundant guard
195
- --> $DIR/redundant_guards.rs:191 :32
219
+ --> $DIR/redundant_guards.rs:199 :32
196
220
|
197
221
LL | B { ref c, .. } if matches!(c, &1) => {},
198
222
| ^^^^^^^^^^^^^^^
@@ -204,7 +228,7 @@ LL + B { c: 1, .. } => {},
204
228
|
205
229
206
230
error: redundant guard
207
- --> $DIR/redundant_guards.rs:201 :26
231
+ --> $DIR/redundant_guards.rs:209 :26
208
232
|
209
233
LL | Some(Some(x)) if x.is_empty() => {},
210
234
| ^^^^^^^^^^^^
@@ -216,7 +240,7 @@ LL + Some(Some("")) => {},
216
240
|
217
241
218
242
error: redundant guard
219
- --> $DIR/redundant_guards.rs:212 :26
243
+ --> $DIR/redundant_guards.rs:220 :26
220
244
|
221
245
LL | Some(Some(x)) if x.is_empty() => {},
222
246
| ^^^^^^^^^^^^
@@ -228,7 +252,7 @@ LL + Some(Some([])) => {},
228
252
|
229
253
230
254
error: redundant guard
231
- --> $DIR/redundant_guards.rs:217 :26
255
+ --> $DIR/redundant_guards.rs:225 :26
232
256
|
233
257
LL | Some(Some(x)) if x.is_empty() => {},
234
258
| ^^^^^^^^^^^^
@@ -240,7 +264,7 @@ LL + Some(Some([])) => {},
240
264
|
241
265
242
266
error: redundant guard
243
- --> $DIR/redundant_guards.rs:228 :26
267
+ --> $DIR/redundant_guards.rs:236 :26
244
268
|
245
269
LL | Some(Some(x)) if x.starts_with(&[]) => {},
246
270
| ^^^^^^^^^^^^^^^^^^
@@ -252,7 +276,7 @@ LL + Some(Some([..])) => {},
252
276
|
253
277
254
278
error: redundant guard
255
- --> $DIR/redundant_guards.rs:233 :26
279
+ --> $DIR/redundant_guards.rs:241 :26
256
280
|
257
281
LL | Some(Some(x)) if x.starts_with(&[1]) => {},
258
282
| ^^^^^^^^^^^^^^^^^^^
@@ -264,7 +288,7 @@ LL + Some(Some([1, ..])) => {},
264
288
|
265
289
266
290
error: redundant guard
267
- --> $DIR/redundant_guards.rs:238 :26
291
+ --> $DIR/redundant_guards.rs:246 :26
268
292
|
269
293
LL | Some(Some(x)) if x.starts_with(&[1, 2]) => {},
270
294
| ^^^^^^^^^^^^^^^^^^^^^^
@@ -276,7 +300,7 @@ LL + Some(Some([1, 2, ..])) => {},
276
300
|
277
301
278
302
error: redundant guard
279
- --> $DIR/redundant_guards.rs:243 :26
303
+ --> $DIR/redundant_guards.rs:251 :26
280
304
|
281
305
LL | Some(Some(x)) if x.ends_with(&[1, 2]) => {},
282
306
| ^^^^^^^^^^^^^^^^^^^^
@@ -287,5 +311,5 @@ LL - Some(Some(x)) if x.ends_with(&[1, 2]) => {},
287
311
LL + Some(Some([.., 1, 2])) => {},
288
312
|
289
313
290
- error: aborting due to 24 previous errors
314
+ error: aborting due to 26 previous errors
291
315
0 commit comments