]>
Commit | Line | Data |
---|---|---|
ea8adc8c XL |
1 | error[E0597]: `a` does not live long enough |
2 | --> $DIR/borrowing.rs:18:20 | |
3 | | | |
4 | 18 | (|| yield &a).resume() | |
5 | | -- ^ does not live long enough | |
6 | | | | |
7 | | capture occurs here | |
8 | 19 | //~^ ERROR: `a` does not live long enough | |
9 | 20 | }; | |
10 | | - borrowed value only lives until here | |
11 | ... | |
12 | 29 | } | |
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 | 24 | || { | |
19 | | -- capture occurs here | |
20 | 25 | yield &a | |
21 | | ^ does not live long enough | |
22 | ... | |
23 | 28 | }; | |
24 | | - borrowed value only lives until here | |
25 | 29 | } | |
26 | | - borrowed value needs to live until here | |
27 | ||
28 | error: aborting due to 2 previous errors | |
29 |