Skip to content

Commit 90412f1

Browse files
committed
Add .stderr files for shadowed labels where the point of the test is to test such cases.
1 parent f78b9ad commit 90412f1

File tree

3 files changed

+610
-0
lines changed

3 files changed

+610
-0
lines changed
Lines changed: 300 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,300 @@
1+
warning: label name `'x` shadows a label name that is already in scope
2+
--> $DIR/hygienic-labels-in-let.rs:23:9
3+
|
4+
LL | 'x: loop { $e }
5+
| ^^ lifetime 'x already in scope
6+
...
7+
LL | 'x: loop {
8+
| -- first declared here
9+
LL | // this 'x should refer to the outer loop, lexically
10+
LL | loop_x!(break 'x);
11+
| ------------------ in this macro invocation
12+
13+
warning: label name `'x` shadows a label name that is already in scope
14+
--> $DIR/hygienic-labels-in-let.rs:55:9
15+
|
16+
LL | 'x: loop {
17+
| -- first declared here
18+
...
19+
LL | 'x: for _ in 0..1 {
20+
| ^^ lifetime 'x already in scope
21+
22+
warning: label name `'x` shadows a label name that is already in scope
23+
--> $DIR/hygienic-labels-in-let.rs:55:9
24+
|
25+
LL | 'x: loop { $e }
26+
| -- first declared here
27+
...
28+
LL | 'x: for _ in 0..1 {
29+
| ^^ lifetime 'x already in scope
30+
31+
warning: label name `'x` shadows a label name that is already in scope
32+
--> $DIR/hygienic-labels-in-let.rs:23:9
33+
|
34+
LL | 'x: loop { $e }
35+
| ^^ lifetime 'x already in scope
36+
...
37+
LL | 'x: loop {
38+
| -- first declared here
39+
...
40+
LL | loop_x!(break 'x);
41+
| ------------------ in this macro invocation
42+
43+
warning: label name `'x` shadows a label name that is already in scope
44+
--> $DIR/hygienic-labels-in-let.rs:23:9
45+
|
46+
LL | 'x: loop { $e }
47+
| ^^
48+
| |
49+
| first declared here
50+
| lifetime 'x already in scope
51+
...
52+
LL | loop_x!(break 'x);
53+
| ------------------ in this macro invocation
54+
55+
warning: label name `'x` shadows a label name that is already in scope
56+
--> $DIR/hygienic-labels-in-let.rs:23:9
57+
|
58+
LL | 'x: loop { $e }
59+
| ^^ lifetime 'x already in scope
60+
...
61+
LL | 'x: for _ in 0..1 {
62+
| -- first declared here
63+
LL | // ditto
64+
LL | loop_x!(break 'x);
65+
| ------------------ in this macro invocation
66+
67+
warning: label name `'x` shadows a label name that is already in scope
68+
--> $DIR/hygienic-labels-in-let.rs:65:9
69+
|
70+
LL | 'x: loop {
71+
| -- first declared here
72+
...
73+
LL | 'x: for _ in 0..1 {
74+
| ^^ lifetime 'x already in scope
75+
76+
warning: label name `'x` shadows a label name that is already in scope
77+
--> $DIR/hygienic-labels-in-let.rs:65:9
78+
|
79+
LL | 'x: loop { $e }
80+
| -- first declared here
81+
...
82+
LL | 'x: for _ in 0..1 {
83+
| ^^ lifetime 'x already in scope
84+
85+
warning: label name `'x` shadows a label name that is already in scope
86+
--> $DIR/hygienic-labels-in-let.rs:65:9
87+
|
88+
LL | 'x: for _ in 0..1 {
89+
| -- first declared here
90+
...
91+
LL | 'x: for _ in 0..1 {
92+
| ^^ lifetime 'x already in scope
93+
94+
warning: label name `'x` shadows a label name that is already in scope
95+
--> $DIR/hygienic-labels-in-let.rs:65:9
96+
|
97+
LL | 'x: loop { $e }
98+
| -- first declared here
99+
...
100+
LL | 'x: for _ in 0..1 {
101+
| ^^ lifetime 'x already in scope
102+
103+
warning: label name `'x` shadows a label name that is already in scope
104+
--> $DIR/hygienic-labels-in-let.rs:30:9
105+
|
106+
LL | 'x: while 1 + 1 == 2 { $e }
107+
| ^^ lifetime 'x already in scope
108+
...
109+
LL | 'x: loop {
110+
| -- first declared here
111+
...
112+
LL | while_true!(break 'x);
113+
| ---------------------- in this macro invocation
114+
115+
warning: label name `'x` shadows a label name that is already in scope
116+
--> $DIR/hygienic-labels-in-let.rs:30:9
117+
|
118+
LL | 'x: loop { $e }
119+
| -- first declared here
120+
...
121+
LL | 'x: while 1 + 1 == 2 { $e }
122+
| ^^ lifetime 'x already in scope
123+
...
124+
LL | while_true!(break 'x);
125+
| ---------------------- in this macro invocation
126+
127+
warning: label name `'x` shadows a label name that is already in scope
128+
--> $DIR/hygienic-labels-in-let.rs:30:9
129+
|
130+
LL | 'x: while 1 + 1 == 2 { $e }
131+
| ^^ lifetime 'x already in scope
132+
...
133+
LL | 'x: for _ in 0..1 {
134+
| -- first declared here
135+
...
136+
LL | while_true!(break 'x);
137+
| ---------------------- in this macro invocation
138+
139+
warning: label name `'x` shadows a label name that is already in scope
140+
--> $DIR/hygienic-labels-in-let.rs:30:9
141+
|
142+
LL | 'x: loop { $e }
143+
| -- first declared here
144+
...
145+
LL | 'x: while 1 + 1 == 2 { $e }
146+
| ^^ lifetime 'x already in scope
147+
...
148+
LL | while_true!(break 'x);
149+
| ---------------------- in this macro invocation
150+
151+
warning: label name `'x` shadows a label name that is already in scope
152+
--> $DIR/hygienic-labels-in-let.rs:30:9
153+
|
154+
LL | 'x: while 1 + 1 == 2 { $e }
155+
| ^^ lifetime 'x already in scope
156+
...
157+
LL | 'x: for _ in 0..1 {
158+
| -- first declared here
159+
LL | // ditto
160+
LL | while_true!(break 'x);
161+
| ---------------------- in this macro invocation
162+
163+
warning: label name `'x` shadows a label name that is already in scope
164+
--> $DIR/hygienic-labels-in-let.rs:75:9
165+
|
166+
LL | 'x: loop {
167+
| -- first declared here
168+
...
169+
LL | 'x: for _ in 0..1 {
170+
| ^^ lifetime 'x already in scope
171+
172+
warning: label name `'x` shadows a label name that is already in scope
173+
--> $DIR/hygienic-labels-in-let.rs:75:9
174+
|
175+
LL | 'x: loop { $e }
176+
| -- first declared here
177+
...
178+
LL | 'x: for _ in 0..1 {
179+
| ^^ lifetime 'x already in scope
180+
181+
warning: label name `'x` shadows a label name that is already in scope
182+
--> $DIR/hygienic-labels-in-let.rs:75:9
183+
|
184+
LL | 'x: for _ in 0..1 {
185+
| -- first declared here
186+
...
187+
LL | 'x: for _ in 0..1 {
188+
| ^^ lifetime 'x already in scope
189+
190+
warning: label name `'x` shadows a label name that is already in scope
191+
--> $DIR/hygienic-labels-in-let.rs:75:9
192+
|
193+
LL | 'x: loop { $e }
194+
| -- first declared here
195+
...
196+
LL | 'x: for _ in 0..1 {
197+
| ^^ lifetime 'x already in scope
198+
199+
warning: label name `'x` shadows a label name that is already in scope
200+
--> $DIR/hygienic-labels-in-let.rs:75:9
201+
|
202+
LL | 'x: for _ in 0..1 {
203+
| -- first declared here
204+
...
205+
LL | 'x: for _ in 0..1 {
206+
| ^^ lifetime 'x already in scope
207+
208+
warning: label name `'x` shadows a label name that is already in scope
209+
--> $DIR/hygienic-labels-in-let.rs:75:9
210+
|
211+
LL | 'x: while 1 + 1 == 2 { $e }
212+
| -- first declared here
213+
...
214+
LL | 'x: for _ in 0..1 {
215+
| ^^ lifetime 'x already in scope
216+
217+
warning: label name `'x` shadows a label name that is already in scope
218+
--> $DIR/hygienic-labels-in-let.rs:37:9
219+
|
220+
LL | 'x: for _ in 0..1 { $e }
221+
| ^^ lifetime 'x already in scope
222+
...
223+
LL | 'x: loop {
224+
| -- first declared here
225+
...
226+
LL | run_once!(continue 'x);
227+
| ----------------------- in this macro invocation
228+
229+
warning: label name `'x` shadows a label name that is already in scope
230+
--> $DIR/hygienic-labels-in-let.rs:37:9
231+
|
232+
LL | 'x: loop { $e }
233+
| -- first declared here
234+
...
235+
LL | 'x: for _ in 0..1 { $e }
236+
| ^^ lifetime 'x already in scope
237+
...
238+
LL | run_once!(continue 'x);
239+
| ----------------------- in this macro invocation
240+
241+
warning: label name `'x` shadows a label name that is already in scope
242+
--> $DIR/hygienic-labels-in-let.rs:37:9
243+
|
244+
LL | 'x: for _ in 0..1 { $e }
245+
| ^^ lifetime 'x already in scope
246+
...
247+
LL | 'x: for _ in 0..1 {
248+
| -- first declared here
249+
...
250+
LL | run_once!(continue 'x);
251+
| ----------------------- in this macro invocation
252+
253+
warning: label name `'x` shadows a label name that is already in scope
254+
--> $DIR/hygienic-labels-in-let.rs:37:9
255+
|
256+
LL | 'x: loop { $e }
257+
| -- first declared here
258+
...
259+
LL | 'x: for _ in 0..1 { $e }
260+
| ^^ lifetime 'x already in scope
261+
...
262+
LL | run_once!(continue 'x);
263+
| ----------------------- in this macro invocation
264+
265+
warning: label name `'x` shadows a label name that is already in scope
266+
--> $DIR/hygienic-labels-in-let.rs:37:9
267+
|
268+
LL | 'x: for _ in 0..1 { $e }
269+
| ^^ lifetime 'x already in scope
270+
...
271+
LL | 'x: for _ in 0..1 {
272+
| -- first declared here
273+
...
274+
LL | run_once!(continue 'x);
275+
| ----------------------- in this macro invocation
276+
277+
warning: label name `'x` shadows a label name that is already in scope
278+
--> $DIR/hygienic-labels-in-let.rs:37:9
279+
|
280+
LL | 'x: while 1 + 1 == 2 { $e }
281+
| -- first declared here
282+
...
283+
LL | 'x: for _ in 0..1 { $e }
284+
| ^^ lifetime 'x already in scope
285+
...
286+
LL | run_once!(continue 'x);
287+
| ----------------------- in this macro invocation
288+
289+
warning: label name `'x` shadows a label name that is already in scope
290+
--> $DIR/hygienic-labels-in-let.rs:37:9
291+
|
292+
LL | 'x: for _ in 0..1 { $e }
293+
| ^^ lifetime 'x already in scope
294+
...
295+
LL | 'x: for _ in 0..1 {
296+
| -- first declared here
297+
LL | // ditto
298+
LL | run_once!(continue 'x);
299+
| ----------------------- in this macro invocation
300+

0 commit comments

Comments
 (0)