rust/src/test/ui/span/regions-escape-loop-via-variable.stderr

13 lines
355 B
Plaintext
Raw Normal View History

2017-05-27 12:58:52 -05:00
error[E0597]: `x` does not live long enough
--> $DIR/regions-escape-loop-via-variable.rs:22:5
|
2017-11-20 06:13:27 -06:00
21 | p = &x;
| - borrow occurs here
2017-11-20 06:13:27 -06:00
22 | } //~ ERROR `x` does not live long enough
| ^ `x` dropped here while still borrowed
23 | }
| - borrowed value needs to live until here
error: aborting due to previous error