]> git.lizzy.rs Git - rust.git/blobdiff - src/test/compile-fail/issue-17954.rs
Updated existing tests with new error messages.
[rust.git] / src / test / compile-fail / issue-17954.rs
index 3e14525250de53945d919e95d115ebcbcf31a9d7..4211057610bc7ebf60e5ae3f805b330209eda5c2 100644 (file)
 
 fn main() {
     let a = &FOO;
-    //[ast]~^ ERROR borrowed value does not live long enough
+    //[mir]~^ ERROR `FOO` does not live long enough [E0597]
+    //[mir]~| does not live long enough
+    //[mir]~| NOTE borrowed value must be valid for the static lifetime
+    //[ast]~^^^^ ERROR borrowed value does not live long enough
     //[ast]~| does not live long enough
     //[ast]~| NOTE borrowed value must be valid for the static lifetime
 
     std::thread::spawn(move || {
         println!("{}", a);
     });
-} //[ast]~ temporary value only lives until here
-  //[mir]~^ ERROR borrowed value does not live long enough
+}
+//[mir]~^ borrowed value only lives until here
+//[ast]~^^ temporary value only lives until here