1 error[E0713]: borrow may still be in use when destructor runs
2 --> $DIR/issue-45696-scribble-on-boxed-borrow.rs:34:5
4 LL | fn scribbled<'a>(s: Scribble<'a>) -> &'a mut u32 {
5 | -- lifetime `'a` defined here
7 | ^^^^^^^^^ returning this value requires that `*s.0` is borrowed for `'a`
9 | - here, drop of `s` needs exclusive access to `*s.0`, because the type `Scribble<'_>` implements the `Drop` trait
11 error[E0713]: borrow may still be in use when destructor runs
12 --> $DIR/issue-45696-scribble-on-boxed-borrow.rs:39:5
14 LL | fn boxed_scribbled<'a>(s: Box<Scribble<'a>>) -> &'a mut u32 {
15 | -- lifetime `'a` defined here
17 | ^^^^^^^^^^^^ returning this value requires that `*s.0` is borrowed for `'a`
19 | - here, drop of `s` needs exclusive access to `*s.0`, because the type `Scribble<'_>` implements the `Drop` trait
21 error[E0713]: borrow may still be in use when destructor runs
22 --> $DIR/issue-45696-scribble-on-boxed-borrow.rs:44:5
24 LL | fn boxed_boxed_scribbled<'a>(s: Box<Box<Scribble<'a>>>) -> &'a mut u32 {
25 | -- lifetime `'a` defined here
27 | ^^^^^^^^^^^^^ returning this value requires that `*s.0` is borrowed for `'a`
29 | - here, drop of `s` needs exclusive access to `*s.0`, because the type `Scribble<'_>` implements the `Drop` trait
31 error: aborting due to 3 previous errors
33 For more information about this error, try `rustc --explain E0713`.