1 error: `x` is shadowed by itself in `x`
7 note: previous binding is here
12 = note: `-D clippy::shadow-same` implied by `-D warnings`
14 error: `mut x` is shadowed by itself in `&x`
15 --> $DIR/shadow.rs:7:13
20 note: previous binding is here
21 --> $DIR/shadow.rs:6:9
26 error: `x` is shadowed by itself in `&mut x`
27 --> $DIR/shadow.rs:8:9
32 note: previous binding is here
33 --> $DIR/shadow.rs:7:9
38 error: `x` is shadowed by itself in `*x`
39 --> $DIR/shadow.rs:9:9
44 note: previous binding is here
45 --> $DIR/shadow.rs:8:9
50 error: `x` is shadowed
51 --> $DIR/shadow.rs:14:9
56 note: previous binding is here
57 --> $DIR/shadow.rs:13:9
59 LL | let x = ([[0]], ());
61 = note: `-D clippy::shadow-reuse` implied by `-D warnings`
63 error: `x` is shadowed
64 --> $DIR/shadow.rs:15:9
69 note: previous binding is here
70 --> $DIR/shadow.rs:14:9
75 error: `x` is shadowed
76 --> $DIR/shadow.rs:16:10
81 note: previous binding is here
82 --> $DIR/shadow.rs:15:9
87 error: `x` is shadowed
88 --> $DIR/shadow.rs:17:9
93 note: previous binding is here
94 --> $DIR/shadow.rs:16:10
99 error: `x` is shadowed
100 --> $DIR/shadow.rs:18:9
105 note: previous binding is here
106 --> $DIR/shadow.rs:17:9
108 LL | let x = Some(x);
111 error: `x` is shadowed
112 --> $DIR/shadow.rs:19:9
117 note: previous binding is here
118 --> $DIR/shadow.rs:18:9
123 error: `x` is shadowed
124 --> $DIR/shadow.rs:20:9
126 LL | let x = Some(1).map(|_| x)?;
129 note: previous binding is here
130 --> $DIR/shadow.rs:19:9
135 error: `y` is shadowed
136 --> $DIR/shadow.rs:22:9
138 LL | let y = match y {
141 note: previous binding is here
142 --> $DIR/shadow.rs:21:9
147 error: `x` shadows a previous, unrelated binding
148 --> $DIR/shadow.rs:31:9
153 note: previous binding is here
154 --> $DIR/shadow.rs:30:9
158 = note: `-D clippy::shadow-unrelated` implied by `-D warnings`
160 error: `x` shadows a previous, unrelated binding
161 --> $DIR/shadow.rs:36:13
166 note: previous binding is here
167 --> $DIR/shadow.rs:35:10
172 error: `x` shadows a previous, unrelated binding
173 --> $DIR/shadow.rs:41:14
178 note: previous binding is here
179 --> $DIR/shadow.rs:38:9
184 error: `x` shadows a previous, unrelated binding
185 --> $DIR/shadow.rs:42:17
190 note: previous binding is here
191 --> $DIR/shadow.rs:41:14
196 error: `x` shadows a previous, unrelated binding
197 --> $DIR/shadow.rs:46:17
199 LL | if let Some(x) = Some(1) {}
202 note: previous binding is here
203 --> $DIR/shadow.rs:38:9
208 error: `x` shadows a previous, unrelated binding
209 --> $DIR/shadow.rs:47:20
211 LL | while let Some(x) = Some(1) {}
214 note: previous binding is here
215 --> $DIR/shadow.rs:38:9
220 error: `x` shadows a previous, unrelated binding
221 --> $DIR/shadow.rs:48:15
223 LL | let _ = |[x]: [u32; 1]| {
226 note: previous binding is here
227 --> $DIR/shadow.rs:38:9
232 error: `x` shadows a previous, unrelated binding
233 --> $DIR/shadow.rs:49:13
238 note: previous binding is here
239 --> $DIR/shadow.rs:48:15
241 LL | let _ = |[x]: [u32; 1]| {
244 error: `y` is shadowed
245 --> $DIR/shadow.rs:52:17
247 LL | if let Some(y) = y {}
250 note: previous binding is here
251 --> $DIR/shadow.rs:51:9
253 LL | let y = Some(1);
256 error: `_b` shadows a previous, unrelated binding
257 --> $DIR/shadow.rs:88:9
262 note: previous binding is here
263 --> $DIR/shadow.rs:87:28
265 LL | pub async fn foo2(_a: i32, _b: i64) {
268 error: `x` shadows a previous, unrelated binding
269 --> $DIR/shadow.rs:94:21
271 LL | if let Some(x) = Some(1) { x } else { 1 }
274 note: previous binding is here
275 --> $DIR/shadow.rs:93:13
280 error: aborting due to 23 previous errors