-
-
Save nikomatsakis/b2b8ded3a9e0bf89d015c93de76df846 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
commit 6d492a522f9eb4e6ceb5ba61ad05b09645ffe6d1 | |
Author: Niko Matsakis <[email protected]> | |
Date: Thu Nov 16 17:11:36 2017 -0500 | |
fix revisions | |
diff --git a/src/test/compile-fail/issue-36082.rs b/src/test/compile-fail/issue-36082.rs | |
index eacd0760d2..a9319ae6a9 100644 | |
--- a/src/test/compile-fail/issue-36082.rs | |
+++ b/src/test/compile-fail/issue-36082.rs | |
@@ -18,13 +18,18 @@ fn main() { | |
let s = 0; | |
let x = RefCell::new((&mut r,s)); | |
- let val: &_ = x.borrow().0; //[ast]~ ERROR borrowed value does not live long enough [E0597] | |
- //[mir]~^ ERROR borrowed value does not live long enough (Ast) [E0597] | |
+ let val: &_ = x.borrow().0; | |
+ //[ast]~^ ERROR borrowed value does not live long enough [E0597] | |
+ //[ast]~| NOTE temporary value dropped here while still borrowed | |
+ //[ast]~| NOTE temporary value created here | |
+ //[ast]~| NOTE consider using a `let` binding to increase its lifetime | |
+ //[mir]~^^^^^ ERROR borrowed value does not live long enough (Ast) [E0597] | |
+ //[mir]~| NOTE temporary value dropped here while still borrowed | |
+ //[mir]~| NOTE temporary value created here | |
+ //[mir]~| NOTE consider using a `let` binding to increase its lifetime | |
//[mir]~| ERROR borrowed value does not live long enough (Mir) [E0597] | |
- //~| temporary value dropped here while still borrowed | |
- //~| temporary value created here | |
- //~| consider using a `let` binding to increase its lifetime | |
println!("{}", val); | |
} | |
-//[ast]~^ temporary value needs to live until here | |
-//[mir]~| temporary value needs to live until here | |
+//[ast]~^ NOTE temporary value needs to live until here | |
+//[mir]~^^ NOTE temporary value needs to live until here | |
+//[mir]~| NOTE temporary value needs to live until here |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment