1 error[E0597]: `young[_]` does not live long enough
2 --> $DIR/borrowck-let-suggestion-suffixes.rs:12:17
4 LL | v2.push(&young[0]); // statement 4
5 | ^^^^^^^^^ borrowed value does not live long enough
8 | - `young[_]` dropped here while still borrowed
10 LL | (v1, v2, v3, /* v4 is above. */ v5).use_ref();
11 | -- borrow later used here
13 error[E0716]: temporary value dropped while borrowed
14 --> $DIR/borrowck-let-suggestion-suffixes.rs:19:14
16 LL | v3.push(&id('x')); // statement 6
17 | ^^^^^^^ - temporary value is freed at the end of this statement
19 | creates a temporary which is freed while still in use
21 LL | (v1, v2, v3, /* v4 is above. */ v5).use_ref();
22 | -- borrow later used here
24 help: consider using a `let` binding to create a longer lived value
26 LL ~ let binding = id('x');
27 LL ~ v3.push(&binding); // statement 6
30 error[E0716]: temporary value dropped while borrowed
31 --> $DIR/borrowck-let-suggestion-suffixes.rs:29:18
33 LL | v4.push(&id('y'));
34 | ^^^^^^^ - temporary value is freed at the end of this statement
36 | creates a temporary which is freed while still in use
39 | ------------ borrow later used here
41 = note: consider using a `let` binding to create a longer lived value
43 error[E0716]: temporary value dropped while borrowed
44 --> $DIR/borrowck-let-suggestion-suffixes.rs:40:14
46 LL | v5.push(&id('z'));
47 | ^^^^^^^ - temporary value is freed at the end of this statement
49 | creates a temporary which is freed while still in use
51 LL | (v1, v2, v3, /* v4 is above. */ v5).use_ref();
52 | -- borrow later used here
54 help: consider using a `let` binding to create a longer lived value
56 LL ~ let binding = id('z');
57 LL ~ v5.push(&binding);
60 error: aborting due to 4 previous errors
62 Some errors have detailed explanations: E0597, E0716.
63 For more information about an error, try `rustc --explain E0597`.