]>
Commit | Line | Data |
---|---|---|
83c7162d | 1 | error[E0597]: `*cell` does not live long enough |
9fa01778 | 2 | --> $DIR/dropck.rs:10:40 |
83c7162d XL |
3 | | |
4 | LL | let ref_ = Box::leak(Box::new(Some(cell.borrow_mut()))); | |
5 | | ^^^^ borrowed value does not live long enough | |
6 | ... | |
7 | LL | } | |
8 | | - `*cell` dropped here while still borrowed | |
9 | | | |
10 | = note: values in a scope are dropped in the opposite order they are created | |
11 | ||
2c00a5a8 | 12 | error[E0597]: `ref_` does not live long enough |
9fa01778 | 13 | --> $DIR/dropck.rs:15:18 |
2c00a5a8 | 14 | | |
0531ce1d | 15 | LL | gen = || { |
2c00a5a8 | 16 | | -- capture occurs here |
0531ce1d | 17 | LL | // but the generator can use it to drop a `Ref<'a, i32>`. |
532ac7d7 | 18 | LL | let _d = ref_.take(); |
2c00a5a8 XL |
19 | | ^^^^ borrowed value does not live long enough |
20 | ... | |
0531ce1d | 21 | LL | } |
2c00a5a8 XL |
22 | | - borrowed value dropped before borrower |
23 | | | |
24 | = note: values in a scope are dropped in the opposite order they are created | |
25 | ||
83c7162d | 26 | error: aborting due to 2 previous errors |
2c00a5a8 | 27 | |
0531ce1d | 28 | For more information about this error, try `rustc --explain E0597`. |