]> git.lizzy.rs Git - rust.git/blobdiff - src/test/compile-fail/borrowck/borrowck-local-borrow-outlives-fn.rs
Updated existing tests with new error messages.
[rust.git] / src / test / compile-fail / borrowck / borrowck-local-borrow-outlives-fn.rs
index fa80a2efdf83dab89815ce3e28f4a7704e5afc2a..0d5feb6b9cc84b2489521f0d5ab999f8041a6030 100644 (file)
@@ -12,8 +12,9 @@
 //[mir]compile-flags: -Z borrowck=mir
 
 fn cplusplus_mode(x: isize) -> &'static isize {
-    &x //[ast]~ ERROR `x` does not live long enough
+    &x
+    //[ast]~^ ERROR `x` does not live long enough [E0597]
+    //[mir]~^^ ERROR `x` does not live long enough [E0597]
 }
-//[mir]~^ ERROR borrowed value does not live long enough
 
 fn main() {}