1 error[E0713]: borrow may still be in use when destructor runs
2 --> $DIR/enum-drop-access.rs:15:31
4 LL | fn drop_enum(opt: DropOption<&mut i32>) -> Option<&mut i32> {
5 | - let's call the lifetime of this reference `'1`
7 LL | DropOption::Some(&mut ref mut r) => { //~ ERROR
10 | ------- returning this value requires that `*opt.0` is borrowed for `'1`
13 | - here, drop of `opt` needs exclusive access to `*opt.0`, because the type `DropOption<&mut i32>` implements the `Drop` trait
15 error[E0713]: borrow may still be in use when destructor runs
16 --> $DIR/enum-drop-access.rs:24:36
18 LL | fn optional_drop_enum(opt: Option<DropOption<&mut i32>>) -> Option<&mut i32> {
19 | - let's call the lifetime of this reference `'1`
21 LL | Some(DropOption::Some(&mut ref mut r)) => { //~ ERROR
24 | ------- returning this value requires that `*opt.0.0` is borrowed for `'1`
27 | - here, drop of `opt` needs exclusive access to `*opt.0.0`, because the type `DropOption<&mut i32>` implements the `Drop` trait
29 error: aborting due to 2 previous errors
31 For more information about this error, try `rustc --explain E0713`.