1 error[E0597]: `*cell` does not live long enough
2 --> $DIR/dropck.rs:19:40
4 LL | let ref_ = Box::leak(Box::new(Some(cell.borrow_mut())));
5 | ^^^^ borrowed value does not live long enough
10 | borrowed value only lives until here
11 | borrow later used here, when `gen` is dropped
13 = note: values in a scope are dropped in the opposite order they are defined
15 error[E0597]: `ref_` does not live long enough
16 --> $DIR/dropck.rs:22:11
20 LL | | // but the generator can use it to drop a `Ref<'a, i32>`.
21 LL | | let _d = ref_.take(); //~ ERROR `ref_` does not live long enough
24 | |_____^ borrowed value does not live long enough
29 | borrowed value only lives until here
30 | borrow later used here, when `gen` is dropped
32 = note: values in a scope are dropped in the opposite order they are defined
34 error: aborting due to 2 previous errors
36 For more information about this error, try `rustc --explain E0597`.