13
13
macro_rules! loop_x {
14
14
( $e: expr) => {
15
15
// $e shouldn't be able to interact with this 'x
16
- ' x: loop { $e }
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
20
- //~| WARNING shadows a label name that is already in scope
21
- }
16
+ ' x: loop {
17
+ $e
18
+ }
19
+ } ;
22
20
}
23
21
24
22
macro_rules! while_true {
25
23
( $e: expr) => {
26
24
// $e shouldn't be able to interact with this 'x
27
- ' x: while 1 + 1 == 2 { $e }
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
32
- //~| WARNING shadows a label name that is already in scope
33
- }
25
+ ' x: while 1 + 1 == 2 {
26
+ $e
27
+ }
28
+ } ;
34
29
}
35
30
36
31
macro_rules! run_once {
37
32
( $e: expr) => {
38
33
// ditto
39
- ' x: for _ in 0 ..1 { $e }
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
46
- //~| WARNING shadows a label name that is already in scope
47
- }
34
+ ' x: for _ in 0 ..1 {
35
+ $e
36
+ }
37
+ } ;
48
38
}
49
39
50
40
pub fn main ( ) {
@@ -63,7 +53,6 @@ pub fn main() {
63
53
let k: isize = {
64
54
' x: for _ in 0 ..1 {
65
55
//~^ WARNING shadows a label name that is already in scope
66
- //~| WARNING shadows a label name that is already in scope
67
56
// ditto
68
57
loop_x ! ( break ' x) ;
69
58
i += 1 ;
@@ -75,9 +64,6 @@ pub fn main() {
75
64
let l: isize = {
76
65
' x: for _ in 0 ..1 {
77
66
//~^ 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
80
- //~| WARNING shadows a label name that is already in scope
81
67
// ditto
82
68
while_true ! ( break ' x) ;
83
69
i += 1 ;
@@ -89,11 +75,6 @@ pub fn main() {
89
75
let n: isize = {
90
76
' x: for _ in 0 ..1 {
91
77
//~^ 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
96
- //~| WARNING shadows a label name that is already in scope
97
78
// ditto
98
79
run_once ! ( continue ' x) ;
99
80
i += 1 ;
0 commit comments