2017-07-15 05:52:49 -05:00
|
|
|
error[E0597]: `b` does not live long enough
|
|
|
|
--> $DIR/ref-escapes-but-not-over-yield.rs:25:5
|
|
|
|
|
|
2017-11-20 06:13:27 -06:00
|
|
|
24 | a = &b;
|
2017-07-15 05:52:49 -05:00
|
|
|
| - borrow occurs here
|
2017-11-20 06:13:27 -06:00
|
|
|
25 | }; //~ ERROR
|
2017-07-15 05:52:49 -05:00
|
|
|
| ^ `b` dropped here while still borrowed
|
|
|
|
26 | }
|
|
|
|
| - borrowed value needs to live until here
|
|
|
|
|
|
|
|
error: aborting due to previous error
|
|
|
|
|