diff options
| author | Jonathan Turner <jturner@mozilla.com> | 2016-08-16 15:02:20 -0700 |
|---|---|---|
| committer | Jonathan Turner <jturner@mozilla.com> | 2016-08-17 15:24:42 -0700 |
| commit | 70ce90c320aa4d6ae7646497a0cd17f775b94e43 (patch) | |
| tree | 5180cf947f5caabb01122aedd47b7f9e1be3f862 /src/test/compile-fail/impl-trait | |
| parent | 514d4cef24a3a463d7423bd75d17335547c6a99c (diff) | |
| download | rust-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.rs | 6 |
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 |
