|
1 | 1 | error[E0713]: borrow may still be in use when destructor runs |
2 | | - --> $DIR/issue-45696-scribble-on-boxed-borrow.rs:52:5 |
| 2 | + --> $DIR/issue-45696-scribble-on-boxed-borrow.rs:34:5 |
3 | 3 | | |
4 | 4 | LL | fn scribbled<'a>(s: Scribble<'a>) -> &'a mut u32 { |
5 | 5 | | -- lifetime `'a` defined here |
6 | 6 | LL | &mut *s.0 |
7 | 7 | | ^^^^^^^^^ returning this value requires that `*s.0` is borrowed for `'a` |
8 | | -... |
9 | 8 | LL | } |
10 | 9 | | - here, drop of `s` needs exclusive access to `*s.0`, because the type `Scribble<'_>` implements the `Drop` trait |
11 | 10 |
|
12 | 11 | error[E0713]: borrow may still be in use when destructor runs |
13 | | - --> $DIR/issue-45696-scribble-on-boxed-borrow.rs:63:5 |
| 12 | + --> $DIR/issue-45696-scribble-on-boxed-borrow.rs:39:5 |
14 | 13 | | |
15 | 14 | LL | fn boxed_scribbled<'a>(s: Box<Scribble<'a>>) -> &'a mut u32 { |
16 | 15 | | -- lifetime `'a` defined here |
17 | 16 | LL | &mut *(*s).0 |
18 | 17 | | ^^^^^^^^^^^^ returning this value requires that `*s.0` is borrowed for `'a` |
19 | | -... |
20 | 18 | LL | } |
21 | 19 | | - here, drop of `s` needs exclusive access to `*s.0`, because the type `Scribble<'_>` implements the `Drop` trait |
22 | 20 |
|
23 | 21 | error[E0713]: borrow may still be in use when destructor runs |
24 | | - --> $DIR/issue-45696-scribble-on-boxed-borrow.rs:74:5 |
| 22 | + --> $DIR/issue-45696-scribble-on-boxed-borrow.rs:44:5 |
25 | 23 | | |
26 | 24 | LL | fn boxed_boxed_scribbled<'a>(s: Box<Box<Scribble<'a>>>) -> &'a mut u32 { |
27 | 25 | | -- lifetime `'a` defined here |
28 | 26 | LL | &mut *(**s).0 |
29 | 27 | | ^^^^^^^^^^^^^ returning this value requires that `*s.0` is borrowed for `'a` |
30 | | -... |
31 | 28 | LL | } |
32 | 29 | | - here, drop of `s` needs exclusive access to `*s.0`, because the type `Scribble<'_>` implements the `Drop` trait |
33 | 30 |
|
|
0 commit comments