]> git.proxmox.com Git - rustc.git/blobdiff - src/test/compile-fail/loops-reject-lifetime-shadowing-label.rs
New upstream version 1.13.0+dfsg1
[rustc.git] / src / test / compile-fail / loops-reject-lifetime-shadowing-label.rs
index 2344d251c9a69ddd8bd8176026b2fb3d36c6a362..0a90917d975e5544516efe1bc931acda96c556bb 100644 (file)
@@ -27,9 +27,10 @@ fn foo() {
 
     let z = 3_i8;
 
-    'a: loop { //~ NOTE shadowed label `'a` declared here
+    'a: loop { //~ NOTE first declared here
         let b = Box::new(|x: &i8| *x) as Box<for <'a> Fn(&'a i8) -> i8>;
         //~^ WARN lifetime name `'a` shadows a label name that is already in scope
+        //~| NOTE lifetime 'a already in scope
         assert_eq!((*b)(&z), z);
         break 'a;
     }