1313macro_rules! loop_x {
1414 ( $e: expr) => {
1515 // $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+ } ;
2220}
2321
2422macro_rules! while_true {
2523 ( $e: expr) => {
2624 // $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+ } ;
3429}
3530
3631macro_rules! run_once {
3732 ( $e: expr) => {
3833 // 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+ } ;
4838}
4939
5040pub fn main ( ) {
@@ -63,7 +53,6 @@ pub fn main() {
6353 let k: isize = {
6454 ' x: for _ in 0 ..1 {
6555 //~^ WARNING shadows a label name that is already in scope
66- //~| WARNING shadows a label name that is already in scope
6756 // ditto
6857 loop_x ! ( break ' x) ;
6958 i += 1 ;
@@ -75,9 +64,6 @@ pub fn main() {
7564 let l: isize = {
7665 ' x: for _ in 0 ..1 {
7766 //~^ 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
8167 // ditto
8268 while_true ! ( break ' x) ;
8369 i += 1 ;
@@ -89,11 +75,6 @@ pub fn main() {
8975 let n: isize = {
9076 ' x: for _ in 0 ..1 {
9177 //~^ 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
9778 // ditto
9879 run_once ! ( continue ' x) ;
9980 i += 1 ;
0 commit comments