2016-10-26 11:10:39 -05:00
|
|
|
error: `x` does not live long enough
|
|
|
|
--> $DIR/regions-escape-loop-via-variable.rs:22:5
|
|
|
|
|
|
|
|
|
21 | p = &x; //~ ERROR `x` does not live long enough
|
|
|
|
| - borrow occurs here
|
|
|
|
22 | }
|
|
|
|
| ^ `x` dropped here while still borrowed
|
|
|
|
23 | }
|
|
|
|
| - borrowed value needs to live until here
|
|
|
|
|
2017-05-22 06:46:05 -05:00
|
|
|
error: aborting due to previous error(s)
|
2016-10-26 11:10:39 -05:00
|
|
|
|