1 error[E0713]: borrow may still be in use when destructor runs
2 --> $DIR/issue-52059-report-when-borrow-and-drop-conflict.rs:14:5
7 | - here, drop of `s` needs exclusive access to `*s.url`, because the type `S<'_>` implements the `Drop` trait
9 note: borrowed value must be valid for the anonymous lifetime #1 defined on the function body at 13:1...
10 --> $DIR/issue-52059-report-when-borrow-and-drop-conflict.rs:13:1
12 LL | / fn finish_1(s: S) -> &mut String {
17 error[E0713]: borrow may still be in use when destructor runs
18 --> $DIR/issue-52059-report-when-borrow-and-drop-conflict.rs:19:13
20 LL | let p = &mut *s.url; p
23 | - here, drop of `s` needs exclusive access to `*s.url`, because the type `S<'_>` implements the `Drop` trait
25 note: borrowed value must be valid for the anonymous lifetime #1 defined on the function body at 18:1...
26 --> $DIR/issue-52059-report-when-borrow-and-drop-conflict.rs:18:1
28 LL | / fn finish_2(s: S) -> &mut String {
29 LL | | let p = &mut *s.url; p
33 error[E0713]: borrow may still be in use when destructor runs
34 --> $DIR/issue-52059-report-when-borrow-and-drop-conflict.rs:24:21
36 LL | let p: &mut _ = s.url; p
39 | - here, drop of `s` needs exclusive access to `*s.url`, because the type `S<'_>` implements the `Drop` trait
41 note: borrowed value must be valid for the anonymous lifetime #1 defined on the function body at 23:1...
42 --> $DIR/issue-52059-report-when-borrow-and-drop-conflict.rs:23:1
44 LL | / fn finish_3(s: S) -> &mut String {
45 LL | | let p: &mut _ = s.url; p
49 error[E0509]: cannot move out of type `S<'_>`, which implements the `Drop` trait
50 --> $DIR/issue-52059-report-when-borrow-and-drop-conflict.rs:29:13
55 | cannot move out of here
56 | help: consider borrowing here: `&s.url`
58 error: aborting due to 4 previous errors
60 Some errors occurred: E0509, E0713.
61 For more information about an error, try `rustc --explain E0509`.