rust/src/test/ui/span/issue-23338-locals-die-before-temps-of-body.stderr

23 lines
691 B
Plaintext
Raw Normal View History

2017-05-27 17:58:52 +00:00
error[E0597]: `y` does not live long enough
--> $DIR/issue-23338-locals-die-before-temps-of-body.rs:21:1
|
20 | y.borrow().clone()
| - borrow occurs here
21 | }
| ^ `y` dropped here while still borrowed
|
= note: values in a scope are dropped in the opposite order they are created
2017-05-27 17:58:52 +00:00
error[E0597]: `y` does not live long enough
--> $DIR/issue-23338-locals-die-before-temps-of-body.rs:28:5
|
27 | y.borrow().clone() //~ ERROR `y` does not live long enough
| - borrow occurs here
28 | };
| ^- borrowed value needs to live until here
| |
| `y` dropped here while still borrowed
error: aborting due to previous error(s)