]> git.lizzy.rs Git - rust.git/blob - src/test/ui/generator/borrowing.stderr
Auto merge of #54624 - arielb1:evaluate-outlives, r=nikomatsakis
[rust.git] / src / test / ui / generator / borrowing.stderr
1 error[E0597]: `a` does not live long enough
2   --> $DIR/borrowing.rs:18:29
3    |
4 LL |         unsafe { (|| yield &a).resume() }
5    |                   --        ^ borrowed value does not live long enough
6    |                   |
7    |                   capture occurs here
8 LL |         //~^ ERROR: `a` does not live long enough
9 LL |     };
10    |     - borrowed value only lives until here
11 ...
12 LL | }
13    | - borrowed value needs to live until here
14
15 error[E0597]: `a` does not live long enough
16   --> $DIR/borrowing.rs:25:20
17    |
18 LL |         || {
19    |         -- capture occurs here
20 LL |             yield &a
21    |                    ^ borrowed value does not live long enough
22 ...
23 LL |     };
24    |     - borrowed value only lives until here
25 LL | }
26    | - borrowed value needs to live until here
27
28 error: aborting due to 2 previous errors
29
30 For more information about this error, try `rustc --explain E0597`.