about summary refs log tree commit diff
path: root/src/test/compile-fail/impl-trait
diff options
context:
space:
mode:
authorJonathan Turner <jturner@mozilla.com>2016-08-16 15:02:20 -0700
committerJonathan Turner <jturner@mozilla.com>2016-08-17 15:24:42 -0700
commit70ce90c320aa4d6ae7646497a0cd17f775b94e43 (patch)
tree5180cf947f5caabb01122aedd47b7f9e1be3f862 /src/test/compile-fail/impl-trait
parent514d4cef24a3a463d7423bd75d17335547c6a99c (diff)
downloadrust-70ce90c320aa4d6ae7646497a0cd17f775b94e43.tar.gz
rust-70ce90c320aa4d6ae7646497a0cd17f775b94e43.zip
Move 'doesn't live long enough' errors to labels
Diffstat (limited to 'src/test/compile-fail/impl-trait')
-rw-r--r--src/test/compile-fail/impl-trait/loan-extend.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/test/compile-fail/impl-trait/loan-extend.rs b/src/test/compile-fail/impl-trait/loan-extend.rs
index ceaa8f4eed7..8dfcb08cff3 100644
--- a/src/test/compile-fail/impl-trait/loan-extend.rs
+++ b/src/test/compile-fail/impl-trait/loan-extend.rs
@@ -14,10 +14,10 @@
 fn borrow<'a, T>(_: &'a mut T) -> impl Copy { () }
 
 fn main() {
-    //~^ NOTE reference must be valid for the block
     let long;
     let mut short = 0;
-    //~^ NOTE but borrowed value is only valid for the block suffix following statement 1
     long = borrow(&mut short);
     //~^ ERROR `short` does not live long enough
-}
+    //~| NOTE does not live long enough
+    //~| NOTE values in a scope are dropped in the opposite order they are created
+} //~ borrowed value dropped before borrower