@@ -249,6 +249,25 @@ error: Err(_) will match all errors, maybe not a good idea
249
249
= note: `-D match-wild-err-arm` implied by `-D warnings`
250
250
= note: to remove this warning, match each error seperately or use unreachable macro
251
251
252
+ error: this `match` has identical arm bodies
253
+ --> $DIR/matches.rs:239:18
254
+ |
255
+ 239 | Ok(_) => println!("ok"),
256
+ | ^^^^^^^^^^^^^^
257
+ |
258
+ = note: `-D match-same-arms` implied by `-D warnings`
259
+ note: same as this
260
+ --> $DIR/matches.rs:238:18
261
+ |
262
+ 238 | Ok(3) => println!("ok"),
263
+ | ^^^^^^^^^^^^^^
264
+ note: consider refactoring into `Ok(3) | Ok(_)`
265
+ --> $DIR/matches.rs:238:18
266
+ |
267
+ 238 | Ok(3) => println!("ok"),
268
+ | ^^^^^^^^^^^^^^
269
+ = note: this error originates in a macro outside of the current crate
270
+
252
271
error: Err(_) will match all errors, maybe not a good idea
253
272
--> $DIR/matches.rs:246:9
254
273
|
@@ -257,6 +276,24 @@ error: Err(_) will match all errors, maybe not a good idea
257
276
|
258
277
= note: to remove this warning, match each error seperately or use unreachable macro
259
278
279
+ error: this `match` has identical arm bodies
280
+ --> $DIR/matches.rs:245:18
281
+ |
282
+ 245 | Ok(_) => println!("ok"),
283
+ | ^^^^^^^^^^^^^^
284
+ |
285
+ note: same as this
286
+ --> $DIR/matches.rs:244:18
287
+ |
288
+ 244 | Ok(3) => println!("ok"),
289
+ | ^^^^^^^^^^^^^^
290
+ note: consider refactoring into `Ok(3) | Ok(_)`
291
+ --> $DIR/matches.rs:244:18
292
+ |
293
+ 244 | Ok(3) => println!("ok"),
294
+ | ^^^^^^^^^^^^^^
295
+ = note: this error originates in a macro outside of the current crate
296
+
260
297
error: Err(_) will match all errors, maybe not a good idea
261
298
--> $DIR/matches.rs:252:9
262
299
|
@@ -265,5 +302,95 @@ error: Err(_) will match all errors, maybe not a good idea
265
302
|
266
303
= note: to remove this warning, match each error seperately or use unreachable macro
267
304
268
- error: aborting due to 26 previous errors
305
+ error: this `match` has identical arm bodies
306
+ --> $DIR/matches.rs:251:18
307
+ |
308
+ 251 | Ok(_) => println!("ok"),
309
+ | ^^^^^^^^^^^^^^
310
+ |
311
+ note: same as this
312
+ --> $DIR/matches.rs:250:18
313
+ |
314
+ 250 | Ok(3) => println!("ok"),
315
+ | ^^^^^^^^^^^^^^
316
+ note: consider refactoring into `Ok(3) | Ok(_)`
317
+ --> $DIR/matches.rs:250:18
318
+ |
319
+ 250 | Ok(3) => println!("ok"),
320
+ | ^^^^^^^^^^^^^^
321
+ = note: this error originates in a macro outside of the current crate
322
+
323
+ error: this `match` has identical arm bodies
324
+ --> $DIR/matches.rs:258:18
325
+ |
326
+ 258 | Ok(_) => println!("ok"),
327
+ | ^^^^^^^^^^^^^^
328
+ |
329
+ note: same as this
330
+ --> $DIR/matches.rs:257:18
331
+ |
332
+ 257 | Ok(3) => println!("ok"),
333
+ | ^^^^^^^^^^^^^^
334
+ note: consider refactoring into `Ok(3) | Ok(_)`
335
+ --> $DIR/matches.rs:257:18
336
+ |
337
+ 257 | Ok(3) => println!("ok"),
338
+ | ^^^^^^^^^^^^^^
339
+ = note: this error originates in a macro outside of the current crate
340
+
341
+ error: this `match` has identical arm bodies
342
+ --> $DIR/matches.rs:265:18
343
+ |
344
+ 265 | Ok(_) => println!("ok"),
345
+ | ^^^^^^^^^^^^^^
346
+ |
347
+ note: same as this
348
+ --> $DIR/matches.rs:264:18
349
+ |
350
+ 264 | Ok(3) => println!("ok"),
351
+ | ^^^^^^^^^^^^^^
352
+ note: consider refactoring into `Ok(3) | Ok(_)`
353
+ --> $DIR/matches.rs:264:18
354
+ |
355
+ 264 | Ok(3) => println!("ok"),
356
+ | ^^^^^^^^^^^^^^
357
+ = note: this error originates in a macro outside of the current crate
358
+
359
+ error: this `match` has identical arm bodies
360
+ --> $DIR/matches.rs:271:18
361
+ |
362
+ 271 | Ok(_) => println!("ok"),
363
+ | ^^^^^^^^^^^^^^
364
+ |
365
+ note: same as this
366
+ --> $DIR/matches.rs:270:18
367
+ |
368
+ 270 | Ok(3) => println!("ok"),
369
+ | ^^^^^^^^^^^^^^
370
+ note: consider refactoring into `Ok(3) | Ok(_)`
371
+ --> $DIR/matches.rs:270:18
372
+ |
373
+ 270 | Ok(3) => println!("ok"),
374
+ | ^^^^^^^^^^^^^^
375
+ = note: this error originates in a macro outside of the current crate
376
+
377
+ error: this `match` has identical arm bodies
378
+ --> $DIR/matches.rs:277:18
379
+ |
380
+ 277 | Ok(_) => println!("ok"),
381
+ | ^^^^^^^^^^^^^^
382
+ |
383
+ note: same as this
384
+ --> $DIR/matches.rs:276:18
385
+ |
386
+ 276 | Ok(3) => println!("ok"),
387
+ | ^^^^^^^^^^^^^^
388
+ note: consider refactoring into `Ok(3) | Ok(_)`
389
+ --> $DIR/matches.rs:276:18
390
+ |
391
+ 276 | Ok(3) => println!("ok"),
392
+ | ^^^^^^^^^^^^^^
393
+ = note: this error originates in a macro outside of the current crate
394
+
395
+ error: aborting due to 33 previous errors
269
396
0 commit comments