]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-45696-scribble-on-boxed-borrow.nll.stderr
Auto merge of #54624 - arielb1:evaluate-outlives, r=nikomatsakis
[rust.git] / src / test / ui / issues / issue-45696-scribble-on-boxed-borrow.nll.stderr
1 error[E0713]: borrow may still be in use when destructor runs
2   --> $DIR/issue-45696-scribble-on-boxed-borrow.rs:63:5
3    |
4 LL |     &mut *s.0 //[nll]~ ERROR borrow may still be in use when destructor runs [E0713]
5    |     ^^^^^^^^^
6 ...
7 LL | }
8    | - here, drop of `s` needs exclusive access to `*s.0`, because the type `Scribble<'_>` implements the `Drop` trait
9    |
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
12    |
13 LL | fn scribbled<'a>(s: Scribble<'a>) -> &'a mut u32 {
14    |              ^^
15
16 error[E0713]: borrow may still be in use when destructor runs
17   --> $DIR/issue-45696-scribble-on-boxed-borrow.rs:73:5
18    |
19 LL |     &mut *(*s).0 //[nll]~ ERROR borrow may still be in use when destructor runs [E0713]
20    |     ^^^^^^^^^^^^
21 ...
22 LL | }
23    | - here, drop of `s` needs exclusive access to `*s.0`, because the type `Scribble<'_>` implements the `Drop` trait
24    |
25 note: borrowed value must be valid for the lifetime 'a as defined on the function body at 72:20...
26   --> $DIR/issue-45696-scribble-on-boxed-borrow.rs:72:20
27    |
28 LL | fn boxed_scribbled<'a>(s: Box<Scribble<'a>>) -> &'a mut u32 {
29    |                    ^^
30
31 error[E0713]: borrow may still be in use when destructor runs
32   --> $DIR/issue-45696-scribble-on-boxed-borrow.rs:83:5
33    |
34 LL |     &mut *(**s).0 //[nll]~ ERROR borrow may still be in use when destructor runs [E0713]
35    |     ^^^^^^^^^^^^^
36 ...
37 LL | }
38    | - here, drop of `s` needs exclusive access to `*s.0`, because the type `Scribble<'_>` implements the `Drop` trait
39    |
40 note: borrowed value must be valid for the lifetime 'a as defined on the function body at 82:26...
41   --> $DIR/issue-45696-scribble-on-boxed-borrow.rs:82:26
42    |
43 LL | fn boxed_boxed_scribbled<'a>(s: Box<Box<Scribble<'a>>>) -> &'a mut u32 {
44    |                          ^^
45
46 error: aborting due to 3 previous errors
47
48 For more information about this error, try `rustc --explain E0713`.