]> git.lizzy.rs Git - rust.git/blob - src/test/ui/span/issue-23338-locals-die-before-temps-of-body.stderr
Auto merge of #54624 - arielb1:evaluate-outlives, r=nikomatsakis
[rust.git] / src / test / ui / span / issue-23338-locals-die-before-temps-of-body.stderr
1 error[E0597]: `y` does not live long enough
2   --> $DIR/issue-23338-locals-die-before-temps-of-body.rs:20:5
3    |
4 LL |     y.borrow().clone()
5    |     ^ borrowed value does not live long enough
6 LL | }
7    | - `y` dropped here while still borrowed
8    |
9    = note: values in a scope are dropped in the opposite order they are created
10
11 error[E0597]: `y` does not live long enough
12   --> $DIR/issue-23338-locals-die-before-temps-of-body.rs:27:9
13    |
14 LL |         y.borrow().clone()
15    |         ^ borrowed value does not live long enough
16 LL |     };
17    |     -- borrowed value needs to live until here
18    |     |
19    |     `y` dropped here while still borrowed
20
21 error: aborting due to 2 previous errors
22
23 For more information about this error, try `rustc --explain E0597`.