1 warning[E0713]: borrow may still be in use when destructor runs
2 --> $DIR/issue-45696-scribble-on-boxed-borrow.rs:63:5
4 LL | &mut *s.0 //[nll]~ ERROR borrow may still be in use when destructor runs [E0713]
8 | - here, drop of `s` needs exclusive access to `*s.0`, because the type `Scribble<'_>` implements the `Drop` trait
10 note: borrowed value must be valid for the lifetime 'a as defined on the function body at 62:14...
11 --> $DIR/issue-45696-scribble-on-boxed-borrow.rs:62:14
13 LL | fn scribbled<'a>(s: Scribble<'a>) -> &'a mut u32 {
15 = warning: This error has been downgraded to a warning for backwards compatibility with previous releases.
16 It represents potential unsoundness in your code.
17 This warning will become a hard error in the future.
19 warning[E0713]: borrow may still be in use when destructor runs
20 --> $DIR/issue-45696-scribble-on-boxed-borrow.rs:73:5
22 LL | &mut *(*s).0 //[nll]~ ERROR borrow may still be in use when destructor runs [E0713]
26 | - here, drop of `s` needs exclusive access to `*s.0`, because the type `Scribble<'_>` implements the `Drop` trait
28 note: borrowed value must be valid for the lifetime 'a as defined on the function body at 72:20...
29 --> $DIR/issue-45696-scribble-on-boxed-borrow.rs:72:20
31 LL | fn boxed_scribbled<'a>(s: Box<Scribble<'a>>) -> &'a mut u32 {
33 = warning: This error has been downgraded to a warning for backwards compatibility with previous releases.
34 It represents potential unsoundness in your code.
35 This warning will become a hard error in the future.
37 warning[E0713]: borrow may still be in use when destructor runs
38 --> $DIR/issue-45696-scribble-on-boxed-borrow.rs:83:5
40 LL | &mut *(**s).0 //[nll]~ ERROR borrow may still be in use when destructor runs [E0713]
44 | - here, drop of `s` needs exclusive access to `*s.0`, because the type `Scribble<'_>` implements the `Drop` trait
46 note: borrowed value must be valid for the lifetime 'a as defined on the function body at 82:26...
47 --> $DIR/issue-45696-scribble-on-boxed-borrow.rs:82:26
49 LL | fn boxed_boxed_scribbled<'a>(s: Box<Box<Scribble<'a>>>) -> &'a mut u32 {
51 = warning: This error has been downgraded to a warning for backwards compatibility with previous releases.
52 It represents potential unsoundness in your code.
53 This warning will become a hard error in the future.
55 error: compilation successful
56 --> $DIR/issue-45696-scribble-on-boxed-borrow.rs:89:1
58 LL | / fn main() { //[ast]~ ERROR compilation successful
59 LL | | //[migrate]~^ ERROR compilation successful
63 LL | | *boxed_boxed_scribbled(Box::new(Box::new(Scribble(&mut x)))) += 10;
67 error: aborting due to previous error
69 For more information about this error, try `rustc --explain E0713`.