@@ -316,5 +316,77 @@ note: previous binding is here
316316LL | fn issue13795(value: Issue13795) {
317317 | ^^^^^
318318
319- error: aborting due to 26 previous errors
319+ error: `x` is shadowed by itself in `x`
320+ --> tests/ui/shadow.rs:180:28
321+ |
322+ LL | fn plain_same(x: u8) { let x = x; }
323+ | ^
324+ |
325+ note: previous binding is here
326+ --> tests/ui/shadow.rs:180:15
327+ |
328+ LL | fn plain_same(x: u8) { let x = x; }
329+ | ^
330+
331+ error: `x` is shadowed by itself in `x`
332+ --> tests/ui/shadow.rs:182:34
333+ |
334+ LL | fn tuple_same((x,): (u8,)) { let x = x; }
335+ | ^
336+ |
337+ note: previous binding is here
338+ --> tests/ui/shadow.rs:182:16
339+ |
340+ LL | fn tuple_same((x,): (u8,)) { let x = x; }
341+ | ^
342+
343+ error: `x` is shadowed
344+ --> tests/ui/shadow.rs:185:29
345+ |
346+ LL | fn plain_reuse(x: u8) { let x = x + 1; }
347+ | ^
348+ |
349+ note: previous binding is here
350+ --> tests/ui/shadow.rs:185:16
351+ |
352+ LL | fn plain_reuse(x: u8) { let x = x + 1; }
353+ | ^
354+
355+ error: `x` is shadowed
356+ --> tests/ui/shadow.rs:187:35
357+ |
358+ LL | fn tuple_reuse((x,): (u8,)) { let x = x + 1; }
359+ | ^
360+ |
361+ note: previous binding is here
362+ --> tests/ui/shadow.rs:187:17
363+ |
364+ LL | fn tuple_reuse((x,): (u8,)) { let x = x + 1; }
365+ | ^
366+
367+ error: `x` shadows a previous, unrelated binding
368+ --> tests/ui/shadow.rs:190:33
369+ |
370+ LL | fn plain_unrelated(x: u8) { let x = 1u8; }
371+ | ^
372+ |
373+ note: previous binding is here
374+ --> tests/ui/shadow.rs:190:20
375+ |
376+ LL | fn plain_unrelated(x: u8) { let x = 1u8; }
377+ | ^
378+
379+ error: `x` shadows a previous, unrelated binding
380+ --> tests/ui/shadow.rs:192:39
381+ |
382+ LL | fn tuple_unrelated((x,): (u8,)) { let x = 1u8; }
383+ | ^
384+ |
385+ note: previous binding is here
386+ --> tests/ui/shadow.rs:192:21
387+ |
388+ LL | fn tuple_unrelated((x,): (u8,)) { let x = 1u8; }
389+ | ^
390+
391+ error: aborting due to 32 previous errors
320392
0 commit comments