diff --git a/src/test/ui/generator/dropck.nll.stderr b/src/test/ui/generator/dropck.nll.stderr index b49bf8171507..ef7e64ffd97a 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 70d819f0f467..5c753817e358 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 72ec5affb182..79a7c0631f48 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 c94558f12bbd..c565842c2c00 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 76a25fa661ec..74db695e7e56 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 e6f43e0a71b5..f7ff4e5169fd 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 2cf408d097b8..a1451866e677 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 ee51304800d3..292c007f5122 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