]> git.proxmox.com Git - rustc.git/blame - src/test/ui/span/borrowck-let-suggestion-suffixes.stderr
New upstream version 1.66.0+dfsg1
[rustc.git] / src / test / ui / span / borrowck-let-suggestion-suffixes.stderr
CommitLineData
48663c56
XL
1error[E0597]: `young[_]` does not live long enough
2 --> $DIR/borrowck-let-suggestion-suffixes.rs:12:17
c30ab7b3 3 |
48663c56
XL
4LL | v2.push(&young[0]); // statement 4
5 | ^^^^^^^^^ borrowed value does not live long enough
c30ab7b3 6...
48663c56
XL
7LL | }
8 | - `young[_]` dropped here while still borrowed
9...
10LL | (v1, v2, v3, /* v4 is above. */ v5).use_ref();
11 | -- borrow later used here
c30ab7b3 12
48663c56 13error[E0716]: temporary value dropped while borrowed
0731742a 14 --> $DIR/borrowck-let-suggestion-suffixes.rs:19:14
c30ab7b3 15 |
0531ce1d 16LL | v3.push(&id('x')); // statement 6
48663c56 17 | ^^^^^^^ - temporary value is freed at the end of this statement
c30ab7b3 18 | |
48663c56 19 | creates a temporary which is freed while still in use
c30ab7b3 20...
48663c56
XL
21LL | (v1, v2, v3, /* v4 is above. */ v5).use_ref();
22 | -- borrow later used here
c30ab7b3 23 |
064997fb
FG
24help: consider using a `let` binding to create a longer lived value
25 |
26LL ~ let binding = id('x');
27LL ~ v3.push(&binding); // statement 6
28 |
c30ab7b3 29
48663c56 30error[E0716]: temporary value dropped while borrowed
0731742a 31 --> $DIR/borrowck-let-suggestion-suffixes.rs:29:18
c30ab7b3 32 |
0531ce1d 33LL | v4.push(&id('y'));
48663c56 34 | ^^^^^^^ - temporary value is freed at the end of this statement
c30ab7b3 35 | |
48663c56 36 | creates a temporary which is freed while still in use
c30ab7b3 37...
48663c56 38LL | v4.use_ref();
c295e0f8 39 | ------------ borrow later used here
c30ab7b3 40 |
48663c56 41 = note: consider using a `let` binding to create a longer lived value
c30ab7b3 42
48663c56 43error[E0716]: temporary value dropped while borrowed
0731742a 44 --> $DIR/borrowck-let-suggestion-suffixes.rs:40:14
c30ab7b3 45 |
0531ce1d 46LL | v5.push(&id('z'));
48663c56 47 | ^^^^^^^ - temporary value is freed at the end of this statement
c30ab7b3 48 | |
48663c56 49 | creates a temporary which is freed while still in use
c30ab7b3 50...
48663c56
XL
51LL | (v1, v2, v3, /* v4 is above. */ v5).use_ref();
52 | -- borrow later used here
c30ab7b3 53 |
064997fb
FG
54help: consider using a `let` binding to create a longer lived value
55 |
56LL ~ let binding = id('z');
57LL ~ v5.push(&binding);
58 |
c30ab7b3 59
041b39d2 60error: aborting due to 4 previous errors
c30ab7b3 61
48663c56
XL
62Some errors have detailed explanations: E0597, E0716.
63For more information about an error, try `rustc --explain E0597`.