about summary refs log tree commit diff
path: root/src/test/ui
diff options
context:
space:
mode:
authorMatthew Jasper <mjjasper1@gmail.com>2018-09-23 16:19:00 +0100
committerMatthew Jasper <mjjasper1@gmail.com>2018-09-23 20:27:41 +0100
commitcfbd1a9a250ba3a82041c46605dcf16356f33727 (patch)
tree20b1036fd24321fb2ca387009b905e35a36a513f /src/test/ui
parent4603fb8862ae5b9b0a82aa848a0bed4e36efc3d6 (diff)
downloadrust-cfbd1a9a250ba3a82041c46605dcf16356f33727.tar.gz
rust-cfbd1a9a250ba3a82041c46605dcf16356f33727.zip
Update tests for changes to drop access
Diffstat (limited to 'src/test/ui')
-rw-r--r--src/test/ui/generator/dropck.nll.stderr2
-rw-r--r--src/test/ui/issues/issue-45696-scribble-on-boxed-borrow.migrate.stderr4
-rw-r--r--src/test/ui/issues/issue-45696-scribble-on-boxed-borrow.nll.stderr4
-rw-r--r--src/test/ui/span/borrowck-ref-into-rvalue.nll.stderr12
-rw-r--r--src/test/ui/span/dropck_arr_cycle_checked.nll.stderr4
-rw-r--r--src/test/ui/span/dropck_vec_cycle_checked.nll.stderr4
-rw-r--r--src/test/ui/span/issue-29106.nll.stderr4
-rw-r--r--src/test/ui/span/vec-must-not-hide-type-from-dropck.nll.stderr2
8 files changed, 26 insertions, 10 deletions
diff --git a/src/test/ui/generator/dropck.nll.stderr b/src/test/ui/generator/dropck.nll.stderr
index b49bf817150..ef7e64ffd97 100644
--- a/src/test/ui/generator/dropck.nll.stderr
+++ b/src/test/ui/generator/dropck.nll.stderr
@@ -9,6 +9,8 @@ LL | }
    | |
    | `*cell` dropped here while still borrowed
    | borrow later used here, when `gen` is dropped
+   |
+   = note: values in a scope are dropped in the opposite order they are defined
 
 error[E0597]: `ref_` does not live long enough
   --> $DIR/dropck.rs:22:11
diff --git a/src/test/ui/issues/issue-45696-scribble-on-boxed-borrow.migrate.stderr b/src/test/ui/issues/issue-45696-scribble-on-boxed-borrow.migrate.stderr
index 70d819f0f46..5c753817e35 100644
--- a/src/test/ui/issues/issue-45696-scribble-on-boxed-borrow.migrate.stderr
+++ b/src/test/ui/issues/issue-45696-scribble-on-boxed-borrow.migrate.stderr
@@ -23,7 +23,7 @@ LL |     &mut *(*s).0 //[nll]~ ERROR borrow may still be in use when destructor
    |     ^^^^^^^^^^^^
 ...
 LL | }
-   | - here, drop of `*s` needs exclusive access to `*s.0`, because the type `Scribble<'_>` implements the `Drop` trait
+   | - here, drop of `s` needs exclusive access to `*s.0`, because the type `Scribble<'_>` implements the `Drop` trait
    |
 note: borrowed value must be valid for the lifetime 'a as defined on the function body at 72:20...
   --> $DIR/issue-45696-scribble-on-boxed-borrow.rs:72:20
@@ -41,7 +41,7 @@ LL |     &mut *(**s).0 //[nll]~ ERROR borrow may still be in use when destructor
    |     ^^^^^^^^^^^^^
 ...
 LL | }
-   | - here, drop of `**s` needs exclusive access to `*s.0`, because the type `Scribble<'_>` implements the `Drop` trait
+   | - here, drop of `s` needs exclusive access to `*s.0`, because the type `Scribble<'_>` implements the `Drop` trait
    |
 note: borrowed value must be valid for the lifetime 'a as defined on the function body at 82:26...
   --> $DIR/issue-45696-scribble-on-boxed-borrow.rs:82:26
diff --git a/src/test/ui/issues/issue-45696-scribble-on-boxed-borrow.nll.stderr b/src/test/ui/issues/issue-45696-scribble-on-boxed-borrow.nll.stderr
index 72ec5affb18..79a7c0631f4 100644
--- a/src/test/ui/issues/issue-45696-scribble-on-boxed-borrow.nll.stderr
+++ b/src/test/ui/issues/issue-45696-scribble-on-boxed-borrow.nll.stderr
@@ -20,7 +20,7 @@ LL |     &mut *(*s).0 //[nll]~ ERROR borrow may still be in use when destructor
    |     ^^^^^^^^^^^^
 ...
 LL | }
-   | - here, drop of `*s` needs exclusive access to `*s.0`, because the type `Scribble<'_>` implements the `Drop` trait
+   | - here, drop of `s` needs exclusive access to `*s.0`, because the type `Scribble<'_>` implements the `Drop` trait
    |
 note: borrowed value must be valid for the lifetime 'a as defined on the function body at 72:20...
   --> $DIR/issue-45696-scribble-on-boxed-borrow.rs:72:20
@@ -35,7 +35,7 @@ LL |     &mut *(**s).0 //[nll]~ ERROR borrow may still be in use when destructor
    |     ^^^^^^^^^^^^^
 ...
 LL | }
-   | - here, drop of `**s` needs exclusive access to `*s.0`, because the type `Scribble<'_>` implements the `Drop` trait
+   | - here, drop of `s` needs exclusive access to `*s.0`, because the type `Scribble<'_>` implements the `Drop` trait
    |
 note: borrowed value must be valid for the lifetime 'a as defined on the function body at 82:26...
   --> $DIR/issue-45696-scribble-on-boxed-borrow.rs:82:26
diff --git a/src/test/ui/span/borrowck-ref-into-rvalue.nll.stderr b/src/test/ui/span/borrowck-ref-into-rvalue.nll.stderr
index c94558f12bb..c565842c2c0 100644
--- a/src/test/ui/span/borrowck-ref-into-rvalue.nll.stderr
+++ b/src/test/ui/span/borrowck-ref-into-rvalue.nll.stderr
@@ -1,11 +1,11 @@
-error[E0713]: borrow may still be in use when destructor runs
-  --> $DIR/borrowck-ref-into-rvalue.rs:14:14
+error[E0597]: borrowed value does not live long enough
+  --> $DIR/borrowck-ref-into-rvalue.rs:13:11
    |
-LL |         Some(ref m) => {
-   |              ^^^^^
+LL |     match Some("Hello".to_string()) {
+   |           ^^^^^^^^^^^^^^^^^^^^^^^^^ temporary value does not live long enough
 ...
 LL |     }
-   |     - drop of temporary value occurs here
+   |     - temporary value only lives until here
 LL |     println!("{}", *msg);
    |                    ---- borrow later used here
    |
@@ -13,4 +13,4 @@ LL |     println!("{}", *msg);
 
 error: aborting due to previous error
 
-For more information about this error, try `rustc --explain E0713`.
+For more information about this error, try `rustc --explain E0597`.
diff --git a/src/test/ui/span/dropck_arr_cycle_checked.nll.stderr b/src/test/ui/span/dropck_arr_cycle_checked.nll.stderr
index 76a25fa661e..74db695e7e5 100644
--- a/src/test/ui/span/dropck_arr_cycle_checked.nll.stderr
+++ b/src/test/ui/span/dropck_arr_cycle_checked.nll.stderr
@@ -9,6 +9,8 @@ LL | }
    | |
    | `b2` dropped here while still borrowed
    | borrow later used here, when `b1` is dropped
+   |
+   = note: values in a scope are dropped in the opposite order they are defined
 
 error[E0597]: `b3` does not live long enough
   --> $DIR/dropck_arr_cycle_checked.rs:105:24
@@ -21,6 +23,8 @@ LL | }
    | |
    | `b3` dropped here while still borrowed
    | borrow later used here, when `b1` is dropped
+   |
+   = note: values in a scope are dropped in the opposite order they are defined
 
 error[E0597]: `b1` does not live long enough
   --> $DIR/dropck_arr_cycle_checked.rs:111:24
diff --git a/src/test/ui/span/dropck_vec_cycle_checked.nll.stderr b/src/test/ui/span/dropck_vec_cycle_checked.nll.stderr
index e6f43e0a71b..f7ff4e5169f 100644
--- a/src/test/ui/span/dropck_vec_cycle_checked.nll.stderr
+++ b/src/test/ui/span/dropck_vec_cycle_checked.nll.stderr
@@ -9,6 +9,8 @@ LL | }
    | |
    | `c2` dropped here while still borrowed
    | borrow later used here, when `c1` is dropped
+   |
+   = note: values in a scope are dropped in the opposite order they are defined
 
 error[E0597]: `c3` does not live long enough
   --> $DIR/dropck_vec_cycle_checked.rs:115:24
@@ -21,6 +23,8 @@ LL | }
    | |
    | `c3` dropped here while still borrowed
    | borrow later used here, when `c1` is dropped
+   |
+   = note: values in a scope are dropped in the opposite order they are defined
 
 error[E0597]: `c1` does not live long enough
   --> $DIR/dropck_vec_cycle_checked.rs:121:24
diff --git a/src/test/ui/span/issue-29106.nll.stderr b/src/test/ui/span/issue-29106.nll.stderr
index 2cf408d097b..a1451866e67 100644
--- a/src/test/ui/span/issue-29106.nll.stderr
+++ b/src/test/ui/span/issue-29106.nll.stderr
@@ -8,6 +8,8 @@ LL |     }
    |     |
    |     `x` dropped here while still borrowed
    |     borrow later used here, when `y` is dropped
+   |
+   = note: values in a scope are dropped in the opposite order they are defined
 
 error[E0597]: `x` does not live long enough
   --> $DIR/issue-29106.rs:33:25
@@ -19,6 +21,8 @@ LL |     }
    |     |
    |     `x` dropped here while still borrowed
    |     borrow later used here, when `y` is dropped
+   |
+   = note: values in a scope are dropped in the opposite order they are defined
 
 error: aborting due to 2 previous errors
 
diff --git a/src/test/ui/span/vec-must-not-hide-type-from-dropck.nll.stderr b/src/test/ui/span/vec-must-not-hide-type-from-dropck.nll.stderr
index ee51304800d..292c007f512 100644
--- a/src/test/ui/span/vec-must-not-hide-type-from-dropck.nll.stderr
+++ b/src/test/ui/span/vec-must-not-hide-type-from-dropck.nll.stderr
@@ -9,6 +9,8 @@ LL | }
    | |
    | `c2` dropped here while still borrowed
    | borrow later used here, when `c1` is dropped
+   |
+   = note: values in a scope are dropped in the opposite order they are defined
 
 error[E0597]: `c1` does not live long enough
   --> $DIR/vec-must-not-hide-type-from-dropck.rs:129:24