1 error: `x` is shadowed by itself in `x`
7 = note: `-D clippy::shadow-same` implied by `-D warnings`
8 note: previous binding is here
14 error: `mut x` is shadowed by itself in `&x`
15 --> $DIR/shadow.rs:6:13
20 note: previous binding is here
21 --> $DIR/shadow.rs:5:9
26 error: `x` is shadowed by itself in `&mut x`
27 --> $DIR/shadow.rs:7:9
32 note: previous binding is here
33 --> $DIR/shadow.rs:6:9
38 error: `x` is shadowed by itself in `*x`
39 --> $DIR/shadow.rs:8:9
44 note: previous binding is here
45 --> $DIR/shadow.rs:7:9
50 error: `x` is shadowed by `x.0` which reuses the original value
51 --> $DIR/shadow.rs:13:9
56 = note: `-D clippy::shadow-reuse` implied by `-D warnings`
57 note: previous binding is here
58 --> $DIR/shadow.rs:12:9
60 LL | let x = ([[0]], ());
63 error: `x` is shadowed by `x[0]` which reuses the original value
64 --> $DIR/shadow.rs:14:9
69 note: previous binding is here
70 --> $DIR/shadow.rs:13:9
75 error: `x` is shadowed by `x` which reuses the original value
76 --> $DIR/shadow.rs:15:10
81 note: previous binding is here
82 --> $DIR/shadow.rs:14:9
87 error: `x` is shadowed by `Some(x)` which reuses the original value
88 --> $DIR/shadow.rs:16:9
93 note: previous binding is here
94 --> $DIR/shadow.rs:15:10
99 error: `x` is shadowed by `foo(x)` which reuses the original value
100 --> $DIR/shadow.rs:17:9
105 note: previous binding is here
106 --> $DIR/shadow.rs:16:9
108 LL | let x = Some(x);
111 error: `x` is shadowed by `|| x` which reuses the original value
112 --> $DIR/shadow.rs:18:9
117 note: previous binding is here
118 --> $DIR/shadow.rs:17:9
123 error: `x` is shadowed by `Some(1).map(|_| x)?` which reuses the original value
124 --> $DIR/shadow.rs:19:9
126 LL | let x = Some(1).map(|_| x)?;
129 note: previous binding is here
130 --> $DIR/shadow.rs:18:9
135 error: `x` shadows a previous, unrelated binding
136 --> $DIR/shadow.rs:25:9
141 = note: `-D clippy::shadow-unrelated` implied by `-D warnings`
142 note: previous binding is here
143 --> $DIR/shadow.rs:24:9
148 error: `x` shadows a previous, unrelated binding
149 --> $DIR/shadow.rs:30:13
154 note: previous binding is here
155 --> $DIR/shadow.rs:29:10
160 error: `x` shadows a previous, unrelated binding
161 --> $DIR/shadow.rs:35:14
166 note: previous binding is here
167 --> $DIR/shadow.rs:32:9
172 error: `x` shadows a previous, unrelated binding
173 --> $DIR/shadow.rs:36:17
178 note: previous binding is here
179 --> $DIR/shadow.rs:35:14
184 error: `x` shadows a previous, unrelated binding
185 --> $DIR/shadow.rs:40:17
187 LL | if let Some(x) = Some(1) {}
190 note: previous binding is here
191 --> $DIR/shadow.rs:32:9
196 error: `x` shadows a previous, unrelated binding
197 --> $DIR/shadow.rs:41:20
199 LL | while let Some(x) = Some(1) {}
202 note: previous binding is here
203 --> $DIR/shadow.rs:32:9
208 error: `x` shadows a previous, unrelated binding
209 --> $DIR/shadow.rs:42:15
211 LL | let _ = |[x]: [u32; 1]| {
214 note: previous binding is here
215 --> $DIR/shadow.rs:32:9
220 error: `x` shadows a previous, unrelated binding
221 --> $DIR/shadow.rs:43:13
226 note: previous binding is here
227 --> $DIR/shadow.rs:42:15
229 LL | let _ = |[x]: [u32; 1]| {
232 error: aborting due to 19 previous errors