]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/label/label_misspelled_2.rs
Parse loop labels missing a leading `'`
[rust.git] / src / test / ui / label / label_misspelled_2.rs
index 28bfe6f26cf0887633c3d1098a06ead5813927f7..55bbe6b30a5930382dbd75afac17550f22749d44 100644 (file)
@@ -7,11 +7,10 @@ fn main() {
     'b: for _ in 0..1 {
         break b; //~ ERROR cannot find value `b` in this scope
     }
-    c: for _ in 0..1 { //~ ERROR expected identifier, found keyword `for`
-        //~^ ERROR expected `<`, found reserved identifier `_`
+    c: for _ in 0..1 { //~ ERROR malformed loop label
         break 'c;
     }
-    d: for _ in 0..1 {
-        break ;
+    d: for _ in 0..1 { //~ ERROR malformed loop label
+        break d; //~ ERROR cannot find value `d` in this scope
     }
 }