diff options
| author | Eduard-Mihai Burtescu <edy.burt@gmail.com> | 2017-08-13 11:46:49 +0300 |
|---|---|---|
| committer | Eduard-Mihai Burtescu <edy.burt@gmail.com> | 2017-08-16 20:30:56 +0300 |
| commit | 014333fbd422f56628a2b5b707d192cef838afc3 (patch) | |
| tree | ed4f2943607c52e31191871b405035451d1c223e /src/test/ui/lifetimes | |
| parent | c88624682ddb5768cca4dacc8482e9bc966261fc (diff) | |
| download | rust-014333fbd422f56628a2b5b707d192cef838afc3.tar.gz rust-014333fbd422f56628a2b5b707d192cef838afc3.zip | |
Stabilize rvalue promotion to 'static.
Diffstat (limited to 'src/test/ui/lifetimes')
| -rw-r--r-- | src/test/ui/lifetimes/borrowck-let-suggestion.rs | 2 | ||||
| -rw-r--r-- | src/test/ui/lifetimes/borrowck-let-suggestion.stderr | 7 |
2 files changed, 5 insertions, 4 deletions
diff --git a/src/test/ui/lifetimes/borrowck-let-suggestion.rs b/src/test/ui/lifetimes/borrowck-let-suggestion.rs index eeafaab44c6..1c904648f9e 100644 --- a/src/test/ui/lifetimes/borrowck-let-suggestion.rs +++ b/src/test/ui/lifetimes/borrowck-let-suggestion.rs @@ -9,7 +9,7 @@ // except according to those terms. fn f() { - let x = [1].iter(); + let x = vec![1].iter(); } fn main() { diff --git a/src/test/ui/lifetimes/borrowck-let-suggestion.stderr b/src/test/ui/lifetimes/borrowck-let-suggestion.stderr index d1ba9246588..6316c066660 100644 --- a/src/test/ui/lifetimes/borrowck-let-suggestion.stderr +++ b/src/test/ui/lifetimes/borrowck-let-suggestion.stderr @@ -1,14 +1,15 @@ error[E0597]: borrowed value does not live long enough - --> $DIR/borrowck-let-suggestion.rs:12:23 + --> $DIR/borrowck-let-suggestion.rs:12:27 | -12 | let x = [1].iter(); - | --- ^ temporary value dropped here while still borrowed +12 | let x = vec![1].iter(); + | ------- ^ temporary value dropped here while still borrowed | | | temporary value created here 13 | } | - temporary value needs to live until here | = note: consider using a `let` binding to increase its lifetime + = note: this error originates in a macro outside of the current crate error: aborting due to previous error |
