]>
Commit | Line | Data |
---|---|---|
ea8adc8c | 1 | error[E0597]: `a` does not live long enough |
0531ce1d | 2 | --> $DIR/borrowing.rs:18:29 |
ea8adc8c | 3 | | |
0531ce1d XL |
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 | }; | |
ea8adc8c XL |
10 | | - borrowed value only lives until here |
11 | ... | |
0531ce1d | 12 | LL | } |
ea8adc8c XL |
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 | | | |
0531ce1d | 18 | LL | || { |
ea8adc8c | 19 | | -- capture occurs here |
0531ce1d | 20 | LL | yield &a |
ff7c6d11 | 21 | | ^ borrowed value does not live long enough |
ea8adc8c | 22 | ... |
0531ce1d | 23 | LL | }; |
ea8adc8c | 24 | | - borrowed value only lives until here |
0531ce1d | 25 | LL | } |
ea8adc8c XL |
26 | | - borrowed value needs to live until here |
27 | ||
28 | error: aborting due to 2 previous errors | |
29 | ||
0531ce1d | 30 | For more information about this error, try `rustc --explain E0597`. |