fork/rust
git clone https://git.julia.blue/fork/rust
8d69840ab92
1.43.1
1error[E0597]: `*cell` does not live long enough 2 --> $DIR/dropck.rs:10:40 3 | 4LL | let ref_ = Box::leak(Box::new(Some(cell.borrow_mut()))); 5 | ^^^^ borrowed value does not live long enough 6... 7LL | } 8 | - 9 | | 10 | `*cell` dropped here while still borrowed 11 | borrow might be used here, when `gen` is dropped and runs the destructor for generator 12 | 13 = note: values in a scope are dropped in the opposite order they are defined 14 15error[E0597]: `ref_` does not live long enough 16 --> $DIR/dropck.rs:15:18 17 | 18LL | gen = || { 19 | -- value captured here by generator 20LL | // but the generator can use it to drop a `Ref<'a, i32>`. 21LL | let _d = ref_.take(); 22 | ^^^^ borrowed value does not live long enough 23... 24LL | } 25 | - 26 | | 27 | `ref_` dropped here while still borrowed 28 | borrow might be used here, when `gen` is dropped and runs the destructor for generator 29 | 30 = note: values in a scope are dropped in the opposite order they are defined 31 32error: aborting due to 2 previous errors 33 34For more information about this error, try `rustc --explain E0597`.