@@ -13,20 +13,36 @@ macro_rules! loop_x {
13
13
( $e: expr) => {
14
14
// $e shouldn't be able to interact with this 'x
15
15
' x: loop { $e }
16
+ //~^ WARNING shadows a label name that is already in scope
17
+ //~| WARNING shadows a label name that is already in scope
18
+ //~| WARNING shadows a label name that is already in scope
19
+ //~| WARNING shadows a label name that is already in scope
16
20
}
17
21
}
18
22
19
23
macro_rules! while_true {
20
24
( $e: expr) => {
21
25
// $e shouldn't be able to interact with this 'x
22
26
' x: while 1 + 1 == 2 { $e }
27
+ //~^ WARNING shadows a label name that is already in scope
28
+ //~| WARNING shadows a label name that is already in scope
29
+ //~| WARNING shadows a label name that is already in scope
30
+ //~| WARNING shadows a label name that is already in scope
31
+ //~| WARNING shadows a label name that is already in scope
23
32
}
24
33
}
25
34
26
35
macro_rules! run_once {
27
36
( $e: expr) => {
28
37
// ditto
29
38
' x: for _ in 0 ..1 { $e }
39
+ //~^ WARNING shadows a label name that is already in scope
40
+ //~| WARNING shadows a label name that is already in scope
41
+ //~| WARNING shadows a label name that is already in scope
42
+ //~| WARNING shadows a label name that is already in scope
43
+ //~| WARNING shadows a label name that is already in scope
44
+ //~| WARNING shadows a label name that is already in scope
45
+ //~| WARNING shadows a label name that is already in scope
30
46
}
31
47
}
32
48
@@ -45,6 +61,8 @@ pub fn main() {
45
61
46
62
let k: isize = {
47
63
' x: for _ in 0 ..1 {
64
+ //~^ WARNING shadows a label name that is already in scope
65
+ //~| WARNING shadows a label name that is already in scope
48
66
// ditto
49
67
loop_x ! ( break ' x) ;
50
68
i += 1 ;
@@ -55,6 +73,10 @@ pub fn main() {
55
73
56
74
let l: isize = {
57
75
' x: for _ in 0 ..1 {
76
+ //~^ WARNING shadows a label name that is already in scope
77
+ //~| WARNING shadows a label name that is already in scope
78
+ //~| WARNING shadows a label name that is already in scope
79
+ //~| WARNING shadows a label name that is already in scope
58
80
// ditto
59
81
while_true ! ( break ' x) ;
60
82
i += 1 ;
@@ -65,6 +87,12 @@ pub fn main() {
65
87
66
88
let n: isize = {
67
89
' x: for _ in 0 ..1 {
90
+ //~^ WARNING shadows a label name that is already in scope
91
+ //~| WARNING shadows a label name that is already in scope
92
+ //~| WARNING shadows a label name that is already in scope
93
+ //~| WARNING shadows a label name that is already in scope
94
+ //~| WARNING shadows a label name that is already in scope
95
+ //~| WARNING shadows a label name that is already in scope
68
96
// ditto
69
97
run_once ! ( continue ' x) ;
70
98
i += 1 ;
0 commit comments