1 error[E0713]: borrow may still be in use when destructor runs
2 --> $DIR/issue-45696-scribble-on-boxed-borrow.rs:63:5
4 LL | fn scribbled<'a>(s: Scribble<'a>) -> &'a mut u32 {
5 | -- lifetime `'a` defined here
6 LL | &mut *s.0 //[nll]~ ERROR borrow may still be in use when destructor runs [E0713]
7 | ^^^^^^^^^ returning this value requires that `*s.0` is borrowed for `'a`
10 | - here, drop of `s` needs exclusive access to `*s.0`, because the type `Scribble<'_>` implements the `Drop` trait
12 error[E0713]: borrow may still be in use when destructor runs
13 --> $DIR/issue-45696-scribble-on-boxed-borrow.rs:74:5
15 LL | fn boxed_scribbled<'a>(s: Box<Scribble<'a>>) -> &'a mut u32 {
16 | -- lifetime `'a` defined here
17 LL | &mut *(*s).0 //[nll]~ ERROR borrow may still be in use when destructor runs [E0713]
18 | ^^^^^^^^^^^^ returning this value requires that `*s.0` is borrowed for `'a`
21 | - here, drop of `s` needs exclusive access to `*s.0`, because the type `Scribble<'_>` implements the `Drop` trait
23 error[E0713]: borrow may still be in use when destructor runs
24 --> $DIR/issue-45696-scribble-on-boxed-borrow.rs:85:5
26 LL | fn boxed_boxed_scribbled<'a>(s: Box<Box<Scribble<'a>>>) -> &'a mut u32 {
27 | -- lifetime `'a` defined here
28 LL | &mut *(**s).0 //[nll]~ ERROR borrow may still be in use when destructor runs [E0713]
29 | ^^^^^^^^^^^^^ returning this value requires that `*s.0` is borrowed for `'a`
32 | - here, drop of `s` needs exclusive access to `*s.0`, because the type `Scribble<'_>` implements the `Drop` trait
34 error: aborting due to 3 previous errors
36 For more information about this error, try `rustc --explain E0713`.