]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/nll/issue-52059-report-when-borrow-and-drop-conflict.stderr
Update tests for changes to cannot move errors
[rust.git] / src / test / ui / nll / issue-52059-report-when-borrow-and-drop-conflict.stderr
index e8741036e1d938dd51468c0c46916dad33c1c898..ce48457abe7ec754a06ca7e68a4b780cc1f92b91 100644 (file)
@@ -1,5 +1,5 @@
 error[E0713]: borrow may still be in use when destructor runs
-  --> $DIR/issue-52059-report-when-borrow-and-drop-conflict.rs:14:5
+  --> $DIR/issue-52059-report-when-borrow-and-drop-conflict.rs:13:5
    |
 LL | fn finish_1(s: S) -> &mut String {
    |             - has type `S<'1>`
@@ -9,7 +9,7 @@ LL | }
    | - here, drop of `s` needs exclusive access to `*s.url`, because the type `S<'_>` implements the `Drop` trait
 
 error[E0713]: borrow may still be in use when destructor runs
-  --> $DIR/issue-52059-report-when-borrow-and-drop-conflict.rs:19:13
+  --> $DIR/issue-52059-report-when-borrow-and-drop-conflict.rs:18:13
    |
 LL | fn finish_2(s: S) -> &mut String {
    |             - has type `S<'1>`
@@ -19,7 +19,7 @@ LL | }
    | - here, drop of `s` needs exclusive access to `*s.url`, because the type `S<'_>` implements the `Drop` trait
 
 error[E0713]: borrow may still be in use when destructor runs
-  --> $DIR/issue-52059-report-when-borrow-and-drop-conflict.rs:24:21
+  --> $DIR/issue-52059-report-when-borrow-and-drop-conflict.rs:23:21
    |
 LL | fn finish_3(s: S) -> &mut String {
    |             - has type `S<'1>`
@@ -29,12 +29,13 @@ LL | }
    | - here, drop of `s` needs exclusive access to `*s.url`, because the type `S<'_>` implements the `Drop` trait
 
 error[E0509]: cannot move out of type `S<'_>`, which implements the `Drop` trait
-  --> $DIR/issue-52059-report-when-borrow-and-drop-conflict.rs:29:13
+  --> $DIR/issue-52059-report-when-borrow-and-drop-conflict.rs:28:13
    |
 LL |     let p = s.url; p
    |             ^^^^^
    |             |
    |             cannot move out of here
+   |             move occurs because `s.url` has type `&mut std::string::String`, which does not implement the `Copy` trait
    |             help: consider borrowing here: `&s.url`
 
 error: aborting due to 4 previous errors