2017-05-27 12:58:52 -05:00
|
|
|
error[E0597]: `young[..]` does not live long enough
|
2016-10-14 10:55:45 -05:00
|
|
|
--> $DIR/borrowck-let-suggestion-suffixes.rs:52:1
|
|
|
|
|
|
|
|
|
19 | v2.push(&young[0]); // statement 4
|
|
|
|
| -------- borrow occurs here
|
|
|
|
...
|
|
|
|
52 | }
|
|
|
|
| ^ `young[..]` dropped here while still borrowed
|
|
|
|
|
|
|
|
|
= note: values in a scope are dropped in the opposite order they are created
|
|
|
|
|
2017-05-27 12:58:52 -05:00
|
|
|
error[E0597]: borrowed value does not live long enough
|
2016-11-03 01:58:01 -05:00
|
|
|
--> $DIR/borrowck-let-suggestion-suffixes.rs:24:18
|
2016-10-14 10:55:45 -05:00
|
|
|
|
|
|
|
|
24 | v3.push(&'x'); // statement 6
|
2016-11-03 01:58:01 -05:00
|
|
|
| --- ^ temporary value dropped here while still borrowed
|
2016-10-14 10:55:45 -05:00
|
|
|
| |
|
|
|
|
| temporary value created here
|
|
|
|
...
|
|
|
|
52 | }
|
|
|
|
| - temporary value needs to live until here
|
|
|
|
|
|
|
|
|
= note: consider using a `let` binding to increase its lifetime
|
|
|
|
|
2017-05-27 12:58:52 -05:00
|
|
|
error[E0597]: borrowed value does not live long enough
|
2016-11-03 01:58:01 -05:00
|
|
|
--> $DIR/borrowck-let-suggestion-suffixes.rs:34:22
|
2016-10-14 10:55:45 -05:00
|
|
|
|
|
|
|
|
34 | v4.push(&'y');
|
2016-11-03 01:58:01 -05:00
|
|
|
| --- ^ temporary value dropped here while still borrowed
|
2016-10-14 10:55:45 -05:00
|
|
|
| |
|
|
|
|
| temporary value created here
|
|
|
|
...
|
|
|
|
40 | } // (statement 7)
|
|
|
|
| - temporary value needs to live until here
|
|
|
|
|
|
|
|
|
= note: consider using a `let` binding to increase its lifetime
|
|
|
|
|
2017-05-27 12:58:52 -05:00
|
|
|
error[E0597]: borrowed value does not live long enough
|
2016-11-03 01:58:01 -05:00
|
|
|
--> $DIR/borrowck-let-suggestion-suffixes.rs:45:18
|
2016-10-14 10:55:45 -05:00
|
|
|
|
|
|
|
|
45 | v5.push(&'z');
|
2016-11-03 01:58:01 -05:00
|
|
|
| --- ^ temporary value dropped here while still borrowed
|
2016-10-14 10:55:45 -05:00
|
|
|
| |
|
|
|
|
| temporary value created here
|
|
|
|
...
|
|
|
|
52 | }
|
|
|
|
| - temporary value needs to live until here
|
|
|
|
|
|
|
|
|
= note: consider using a `let` binding to increase its lifetime
|
|
|
|
|
2017-05-22 06:46:05 -05:00
|
|
|
error: aborting due to previous error(s)
|
2016-10-14 10:55:45 -05:00
|
|
|
|