2017-12-10 14:36:42 -06:00
|
|
|
error[E0597]: `z` does not live long enough (Ast)
|
2017-12-13 19:27:23 -06:00
|
|
|
--> $DIR/issue-46471-1.rs:16:14
|
2017-12-10 14:36:42 -06:00
|
|
|
|
|
|
|
|
16 | &mut z
|
2017-12-13 19:27:23 -06:00
|
|
|
| ^ borrowed value does not live long enough
|
2017-12-10 14:36:42 -06:00
|
|
|
17 | };
|
2017-12-13 19:27:23 -06:00
|
|
|
| - `z` dropped here while still borrowed
|
2017-12-10 14:36:42 -06:00
|
|
|
...
|
|
|
|
21 | }
|
|
|
|
| - borrowed value needs to live until here
|
|
|
|
|
|
|
|
error[E0597]: `z` does not live long enough (Mir)
|
|
|
|
--> $DIR/issue-46471-1.rs:17:6
|
|
|
|
|
|
|
|
|
16 | &mut z
|
|
|
|
| ------ borrow occurs here
|
|
|
|
17 | };
|
|
|
|
| ^ `z` dropped here while still borrowed
|
|
|
|
...
|
|
|
|
21 | }
|
|
|
|
| - borrowed value needs to live until here
|
|
|
|
|
|
|
|
error: aborting due to 2 previous errors
|
|
|
|
|