summaryrefslogtreecommitdiffstats
path: root/tests/ui/span/borrowck-let-suggestion-suffixes.stderr
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/span/borrowck-let-suggestion-suffixes.stderr')
-rw-r--r--tests/ui/span/borrowck-let-suggestion-suffixes.stderr11
1 files changed, 7 insertions, 4 deletions
diff --git a/tests/ui/span/borrowck-let-suggestion-suffixes.stderr b/tests/ui/span/borrowck-let-suggestion-suffixes.stderr
index 2dc29a78d..545b235a5 100644
--- a/tests/ui/span/borrowck-let-suggestion-suffixes.stderr
+++ b/tests/ui/span/borrowck-let-suggestion-suffixes.stderr
@@ -1,6 +1,9 @@
error[E0597]: `young[_]` does not live long enough
- --> $DIR/borrowck-let-suggestion-suffixes.rs:12:17
+ --> $DIR/borrowck-let-suggestion-suffixes.rs:13:17
|
+LL | let young = ['y']; // statement 3
+ | ----- binding `young` declared here
+...
LL | v2.push(&young[0]); // statement 4
| ^^^^^^^^^ borrowed value does not live long enough
...
@@ -11,7 +14,7 @@ LL | (v1, v2, v3, /* v4 is above. */ v5).use_ref();
| -- borrow later used here
error[E0716]: temporary value dropped while borrowed
- --> $DIR/borrowck-let-suggestion-suffixes.rs:19:14
+ --> $DIR/borrowck-let-suggestion-suffixes.rs:20:14
|
LL | v3.push(&id('x')); // statement 6
| ^^^^^^^ - temporary value is freed at the end of this statement
@@ -28,7 +31,7 @@ LL ~ v3.push(&binding); // statement 6
|
error[E0716]: temporary value dropped while borrowed
- --> $DIR/borrowck-let-suggestion-suffixes.rs:29:18
+ --> $DIR/borrowck-let-suggestion-suffixes.rs:30:18
|
LL | v4.push(&id('y'));
| ^^^^^^^ - temporary value is freed at the end of this statement
@@ -41,7 +44,7 @@ LL | v4.use_ref();
= note: consider using a `let` binding to create a longer lived value
error[E0716]: temporary value dropped while borrowed
- --> $DIR/borrowck-let-suggestion-suffixes.rs:40:14
+ --> $DIR/borrowck-let-suggestion-suffixes.rs:41:14
|
LL | v5.push(&id('z'));
| ^^^^^^^ - temporary value is freed at the end of this statement