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