about summary refs log tree commit diff
path: root/src/test/compile-fail/impl-trait
diff options
context:
space:
mode:
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