]>
Commit | Line | Data |
---|---|---|
ea8adc8c | 1 | error[E0597]: `a` does not live long enough |
9fa01778 | 2 | --> $DIR/borrowing.rs:9:33 |
ea8adc8c | 3 | | |
ba9703b0 XL |
4 | LL | let _b = { |
5 | | -- borrow later stored here | |
6 | LL | let a = 3; | |
74b04a01 | 7 | LL | Pin::new(&mut || yield &a).resume(()) |
ba9703b0 XL |
8 | | -- ^ borrowed value does not live long enough |
9 | | | | |
48663c56 | 10 | | value captured here by generator |
532ac7d7 | 11 | LL | |
0531ce1d | 12 | LL | }; |
ba9703b0 | 13 | | - `a` dropped here while still borrowed |
ea8adc8c XL |
14 | |
15 | error[E0597]: `a` does not live long enough | |
9fa01778 | 16 | --> $DIR/borrowing.rs:16:20 |
ea8adc8c | 17 | | |
48663c56 XL |
18 | LL | let _b = { |
19 | | -- borrow later stored here | |
20 | LL | let a = 3; | |
0531ce1d | 21 | LL | || { |
48663c56 | 22 | | -- value captured here by generator |
0531ce1d | 23 | LL | yield &a |
ff7c6d11 | 24 | | ^ borrowed value does not live long enough |
ea8adc8c | 25 | ... |
0531ce1d | 26 | LL | }; |
48663c56 | 27 | | - `a` dropped here while still borrowed |
ea8adc8c XL |
28 | |
29 | error: aborting due to 2 previous errors | |
30 | ||
0531ce1d | 31 | For more information about this error, try `rustc --explain E0597`. |