]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/hygiene/hygienic-labels-in-let.rs
Bless tests.
[rust.git] / src / test / ui / hygiene / hygienic-labels-in-let.rs
index 491855d7becd153cd14b1051767942c9b96a6ee5..19f72f24459b323fb395ee1a3d0dbbc5dc107de5 100644 (file)
 macro_rules! loop_x {
     ($e: expr) => {
         // $e shouldn't be able to interact with this 'x
-        'x: loop { $e }
-        //~^ WARNING shadows a label name that is already in scope
-        //~| WARNING shadows a label name that is already in scope
-        //~| WARNING shadows a label name that is already in scope
-        //~| WARNING shadows a label name that is already in scope
-    }
+        'x: loop {
+            $e
+        }
+    };
 }
 
 macro_rules! while_true {
     ($e: expr) => {
         // $e shouldn't be able to interact with this 'x
-        'x: while 1 + 1 == 2 { $e }
-        //~^ WARNING shadows a label name that is already in scope
-        //~| WARNING shadows a label name that is already in scope
-        //~| WARNING shadows a label name that is already in scope
-        //~| WARNING shadows a label name that is already in scope
-        //~| WARNING shadows a label name that is already in scope
-    }
+        'x: while 1 + 1 == 2 {
+            $e
+        }
+    };
 }
 
 macro_rules! run_once {
     ($e: expr) => {
         // ditto
-        'x: for _ in 0..1 { $e }
-        //~^ WARNING shadows a label name that is already in scope
-        //~| WARNING shadows a label name that is already in scope
-        //~| WARNING shadows a label name that is already in scope
-        //~| WARNING shadows a label name that is already in scope
-        //~| WARNING shadows a label name that is already in scope
-        //~| WARNING shadows a label name that is already in scope
-        //~| WARNING shadows a label name that is already in scope
-    }
+        'x: for _ in 0..1 {
+            $e
+        }
+    };
 }
 
 pub fn main() {
@@ -63,7 +53,6 @@ pub fn main() {
     let k: isize = {
         'x: for _ in 0..1 {
             //~^ WARNING shadows a label name that is already in scope
-            //~| WARNING shadows a label name that is already in scope
             // ditto
             loop_x!(break 'x);
             i += 1;
@@ -75,9 +64,6 @@ pub fn main() {
     let l: isize = {
         'x: for _ in 0..1 {
             //~^ WARNING shadows a label name that is already in scope
-            //~| WARNING shadows a label name that is already in scope
-            //~| WARNING shadows a label name that is already in scope
-            //~| WARNING shadows a label name that is already in scope
             // ditto
             while_true!(break 'x);
             i += 1;
@@ -89,11 +75,6 @@ pub fn main() {
     let n: isize = {
         'x: for _ in 0..1 {
             //~^ WARNING shadows a label name that is already in scope
-            //~| WARNING shadows a label name that is already in scope
-            //~| WARNING shadows a label name that is already in scope
-            //~| WARNING shadows a label name that is already in scope
-            //~| WARNING shadows a label name that is already in scope
-            //~| WARNING shadows a label name that is already in scope
             // ditto
             run_once!(continue 'x);
             i += 1;