|
1 | 1 | error: `x` is shadowed by itself in `x` |
2 | | - --> $DIR/shadow.rs:13:9 |
| 2 | + --> $DIR/shadow.rs:19:9 |
3 | 3 | | |
4 | 4 | LL | let x = x; |
5 | 5 | | ^ |
6 | 6 | | |
7 | 7 | note: previous binding is here |
8 | | - --> $DIR/shadow.rs:12:9 |
| 8 | + --> $DIR/shadow.rs:18:9 |
9 | 9 | | |
10 | 10 | LL | let x = 1; |
11 | 11 | | ^ |
12 | 12 | = note: `-D clippy::shadow-same` implied by `-D warnings` |
13 | 13 |
|
14 | 14 | error: `mut x` is shadowed by itself in `&x` |
15 | | - --> $DIR/shadow.rs:14:13 |
| 15 | + --> $DIR/shadow.rs:20:13 |
16 | 16 | | |
17 | 17 | LL | let mut x = &x; |
18 | 18 | | ^ |
19 | 19 | | |
20 | 20 | note: previous binding is here |
21 | | - --> $DIR/shadow.rs:13:9 |
| 21 | + --> $DIR/shadow.rs:19:9 |
22 | 22 | | |
23 | 23 | LL | let x = x; |
24 | 24 | | ^ |
25 | 25 |
|
26 | 26 | error: `x` is shadowed by itself in `&mut x` |
27 | | - --> $DIR/shadow.rs:15:9 |
| 27 | + --> $DIR/shadow.rs:21:9 |
28 | 28 | | |
29 | 29 | LL | let x = &mut x; |
30 | 30 | | ^ |
31 | 31 | | |
32 | 32 | note: previous binding is here |
33 | | - --> $DIR/shadow.rs:14:9 |
| 33 | + --> $DIR/shadow.rs:20:9 |
34 | 34 | | |
35 | 35 | LL | let mut x = &x; |
36 | 36 | | ^^^^^ |
37 | 37 |
|
38 | 38 | error: `x` is shadowed by itself in `*x` |
39 | | - --> $DIR/shadow.rs:16:9 |
| 39 | + --> $DIR/shadow.rs:22:9 |
40 | 40 | | |
41 | 41 | LL | let x = *x; |
42 | 42 | | ^ |
43 | 43 | | |
44 | 44 | note: previous binding is here |
45 | | - --> $DIR/shadow.rs:15:9 |
| 45 | + --> $DIR/shadow.rs:21:9 |
46 | 46 | | |
47 | 47 | LL | let x = &mut x; |
48 | 48 | | ^ |
49 | 49 |
|
50 | 50 | error: `x` is shadowed |
51 | | - --> $DIR/shadow.rs:21:9 |
| 51 | + --> $DIR/shadow.rs:27:9 |
52 | 52 | | |
53 | 53 | LL | let x = x.0; |
54 | 54 | | ^ |
55 | 55 | | |
56 | 56 | note: previous binding is here |
57 | | - --> $DIR/shadow.rs:20:9 |
| 57 | + --> $DIR/shadow.rs:26:9 |
58 | 58 | | |
59 | 59 | LL | let x = ([[0]], ()); |
60 | 60 | | ^ |
61 | 61 | = note: `-D clippy::shadow-reuse` implied by `-D warnings` |
62 | 62 |
|
63 | 63 | error: `x` is shadowed |
64 | | - --> $DIR/shadow.rs:22:9 |
| 64 | + --> $DIR/shadow.rs:28:9 |
65 | 65 | | |
66 | 66 | LL | let x = x[0]; |
67 | 67 | | ^ |
68 | 68 | | |
69 | 69 | note: previous binding is here |
70 | | - --> $DIR/shadow.rs:21:9 |
| 70 | + --> $DIR/shadow.rs:27:9 |
71 | 71 | | |
72 | 72 | LL | let x = x.0; |
73 | 73 | | ^ |
74 | 74 |
|
75 | 75 | error: `x` is shadowed |
76 | | - --> $DIR/shadow.rs:23:10 |
| 76 | + --> $DIR/shadow.rs:29:10 |
77 | 77 | | |
78 | 78 | LL | let [x] = x; |
79 | 79 | | ^ |
80 | 80 | | |
81 | 81 | note: previous binding is here |
82 | | - --> $DIR/shadow.rs:22:9 |
| 82 | + --> $DIR/shadow.rs:28:9 |
83 | 83 | | |
84 | 84 | LL | let x = x[0]; |
85 | 85 | | ^ |
86 | 86 |
|
87 | 87 | error: `x` is shadowed |
88 | | - --> $DIR/shadow.rs:24:9 |
| 88 | + --> $DIR/shadow.rs:30:9 |
89 | 89 | | |
90 | 90 | LL | let x = Some(x); |
91 | 91 | | ^ |
92 | 92 | | |
93 | 93 | note: previous binding is here |
94 | | - --> $DIR/shadow.rs:23:10 |
| 94 | + --> $DIR/shadow.rs:29:10 |
95 | 95 | | |
96 | 96 | LL | let [x] = x; |
97 | 97 | | ^ |
98 | 98 |
|
99 | 99 | error: `x` is shadowed |
100 | | - --> $DIR/shadow.rs:25:9 |
| 100 | + --> $DIR/shadow.rs:31:9 |
101 | 101 | | |
102 | 102 | LL | let x = foo(x); |
103 | 103 | | ^ |
104 | 104 | | |
105 | 105 | note: previous binding is here |
106 | | - --> $DIR/shadow.rs:24:9 |
| 106 | + --> $DIR/shadow.rs:30:9 |
107 | 107 | | |
108 | 108 | LL | let x = Some(x); |
109 | 109 | | ^ |
110 | 110 |
|
111 | 111 | error: `x` is shadowed |
112 | | - --> $DIR/shadow.rs:26:9 |
| 112 | + --> $DIR/shadow.rs:32:9 |
113 | 113 | | |
114 | 114 | LL | let x = || x; |
115 | 115 | | ^ |
116 | 116 | | |
117 | 117 | note: previous binding is here |
118 | | - --> $DIR/shadow.rs:25:9 |
| 118 | + --> $DIR/shadow.rs:31:9 |
119 | 119 | | |
120 | 120 | LL | let x = foo(x); |
121 | 121 | | ^ |
122 | 122 |
|
123 | 123 | error: `x` is shadowed |
124 | | - --> $DIR/shadow.rs:27:9 |
| 124 | + --> $DIR/shadow.rs:33:9 |
125 | 125 | | |
126 | 126 | LL | let x = Some(1).map(|_| x)?; |
127 | 127 | | ^ |
128 | 128 | | |
129 | 129 | note: previous binding is here |
130 | | - --> $DIR/shadow.rs:26:9 |
| 130 | + --> $DIR/shadow.rs:32:9 |
131 | 131 | | |
132 | 132 | LL | let x = || x; |
133 | 133 | | ^ |
134 | 134 |
|
135 | 135 | error: `y` is shadowed |
136 | | - --> $DIR/shadow.rs:29:9 |
| 136 | + --> $DIR/shadow.rs:35:9 |
137 | 137 | | |
138 | 138 | LL | let y = match y { |
139 | 139 | | ^ |
140 | 140 | | |
141 | 141 | note: previous binding is here |
142 | | - --> $DIR/shadow.rs:28:9 |
| 142 | + --> $DIR/shadow.rs:34:9 |
143 | 143 | | |
144 | 144 | LL | let y = 1; |
145 | 145 | | ^ |
146 | 146 |
|
147 | 147 | error: `x` shadows a previous, unrelated binding |
148 | | - --> $DIR/shadow.rs:38:9 |
| 148 | + --> $DIR/shadow.rs:50:9 |
149 | 149 | | |
150 | 150 | LL | let x = 2; |
151 | 151 | | ^ |
152 | 152 | | |
153 | 153 | note: previous binding is here |
154 | | - --> $DIR/shadow.rs:37:9 |
| 154 | + --> $DIR/shadow.rs:49:9 |
155 | 155 | | |
156 | 156 | LL | let x = 1; |
157 | 157 | | ^ |
158 | 158 | = note: `-D clippy::shadow-unrelated` implied by `-D warnings` |
159 | 159 |
|
160 | 160 | error: `x` shadows a previous, unrelated binding |
161 | | - --> $DIR/shadow.rs:43:13 |
| 161 | + --> $DIR/shadow.rs:55:13 |
162 | 162 | | |
163 | 163 | LL | let x = 1; |
164 | 164 | | ^ |
165 | 165 | | |
166 | 166 | note: previous binding is here |
167 | | - --> $DIR/shadow.rs:42:10 |
| 167 | + --> $DIR/shadow.rs:54:10 |
168 | 168 | | |
169 | 169 | LL | fn f(x: u32) { |
170 | 170 | | ^ |
171 | 171 |
|
172 | 172 | error: `x` shadows a previous, unrelated binding |
173 | | - --> $DIR/shadow.rs:48:14 |
| 173 | + --> $DIR/shadow.rs:60:14 |
174 | 174 | | |
175 | 175 | LL | Some(x) => { |
176 | 176 | | ^ |
177 | 177 | | |
178 | 178 | note: previous binding is here |
179 | | - --> $DIR/shadow.rs:45:9 |
| 179 | + --> $DIR/shadow.rs:57:9 |
180 | 180 | | |
181 | 181 | LL | let x = 1; |
182 | 182 | | ^ |
183 | 183 |
|
184 | 184 | error: `x` shadows a previous, unrelated binding |
185 | | - --> $DIR/shadow.rs:49:17 |
| 185 | + --> $DIR/shadow.rs:61:17 |
186 | 186 | | |
187 | 187 | LL | let x = 1; |
188 | 188 | | ^ |
189 | 189 | | |
190 | 190 | note: previous binding is here |
191 | | - --> $DIR/shadow.rs:48:14 |
| 191 | + --> $DIR/shadow.rs:60:14 |
192 | 192 | | |
193 | 193 | LL | Some(x) => { |
194 | 194 | | ^ |
195 | 195 |
|
196 | 196 | error: `x` shadows a previous, unrelated binding |
197 | | - --> $DIR/shadow.rs:53:17 |
| 197 | + --> $DIR/shadow.rs:65:17 |
198 | 198 | | |
199 | 199 | LL | if let Some(x) = Some(1) {} |
200 | 200 | | ^ |
201 | 201 | | |
202 | 202 | note: previous binding is here |
203 | | - --> $DIR/shadow.rs:45:9 |
| 203 | + --> $DIR/shadow.rs:57:9 |
204 | 204 | | |
205 | 205 | LL | let x = 1; |
206 | 206 | | ^ |
207 | 207 |
|
208 | 208 | error: `x` shadows a previous, unrelated binding |
209 | | - --> $DIR/shadow.rs:54:20 |
| 209 | + --> $DIR/shadow.rs:66:20 |
210 | 210 | | |
211 | 211 | LL | while let Some(x) = Some(1) {} |
212 | 212 | | ^ |
213 | 213 | | |
214 | 214 | note: previous binding is here |
215 | | - --> $DIR/shadow.rs:45:9 |
| 215 | + --> $DIR/shadow.rs:57:9 |
216 | 216 | | |
217 | 217 | LL | let x = 1; |
218 | 218 | | ^ |
219 | 219 |
|
220 | 220 | error: `x` shadows a previous, unrelated binding |
221 | | - --> $DIR/shadow.rs:55:15 |
| 221 | + --> $DIR/shadow.rs:67:15 |
222 | 222 | | |
223 | 223 | LL | let _ = |[x]: [u32; 1]| { |
224 | 224 | | ^ |
225 | 225 | | |
226 | 226 | note: previous binding is here |
227 | | - --> $DIR/shadow.rs:45:9 |
| 227 | + --> $DIR/shadow.rs:57:9 |
228 | 228 | | |
229 | 229 | LL | let x = 1; |
230 | 230 | | ^ |
231 | 231 |
|
232 | 232 | error: `x` shadows a previous, unrelated binding |
233 | | - --> $DIR/shadow.rs:56:13 |
| 233 | + --> $DIR/shadow.rs:68:13 |
234 | 234 | | |
235 | 235 | LL | let x = 1; |
236 | 236 | | ^ |
237 | 237 | | |
238 | 238 | note: previous binding is here |
239 | | - --> $DIR/shadow.rs:55:15 |
| 239 | + --> $DIR/shadow.rs:67:15 |
240 | 240 | | |
241 | 241 | LL | let _ = |[x]: [u32; 1]| { |
242 | 242 | | ^ |
243 | 243 |
|
244 | 244 | error: `y` is shadowed |
245 | | - --> $DIR/shadow.rs:59:17 |
| 245 | + --> $DIR/shadow.rs:71:17 |
246 | 246 | | |
247 | 247 | LL | if let Some(y) = y {} |
248 | 248 | | ^ |
249 | 249 | | |
250 | 250 | note: previous binding is here |
251 | | - --> $DIR/shadow.rs:58:9 |
| 251 | + --> $DIR/shadow.rs:70:9 |
252 | 252 | | |
253 | 253 | LL | let y = Some(1); |
254 | 254 | | ^ |
255 | 255 |
|
256 | 256 | error: `_b` shadows a previous, unrelated binding |
257 | | - --> $DIR/shadow.rs:95:9 |
| 257 | + --> $DIR/shadow.rs:107:9 |
258 | 258 | | |
259 | 259 | LL | let _b = _a; |
260 | 260 | | ^^ |
261 | 261 | | |
262 | 262 | note: previous binding is here |
263 | | - --> $DIR/shadow.rs:94:28 |
| 263 | + --> $DIR/shadow.rs:106:28 |
264 | 264 | | |
265 | 265 | LL | pub async fn foo2(_a: i32, _b: i64) { |
266 | 266 | | ^^ |
267 | 267 |
|
268 | 268 | error: `x` shadows a previous, unrelated binding |
269 | | - --> $DIR/shadow.rs:101:21 |
| 269 | + --> $DIR/shadow.rs:113:21 |
270 | 270 | | |
271 | 271 | LL | if let Some(x) = Some(1) { x } else { 1 } |
272 | 272 | | ^ |
273 | 273 | | |
274 | 274 | note: previous binding is here |
275 | | - --> $DIR/shadow.rs:100:13 |
| 275 | + --> $DIR/shadow.rs:112:13 |
276 | 276 | | |
277 | 277 | LL | let x = 1; |
278 | 278 | | ^ |
|
0 commit comments