diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:19:41 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:19:41 +0000 |
commit | 4f9fe856a25ab29345b90e7725509e9ee38a37be (patch) | |
tree | e4ffd8a9374cae7b21f7cbfb352927e0e074aff6 /tests/ui/span/regions-escape-loop-via-vec.stderr | |
parent | Adding upstream version 1.68.2+dfsg1. (diff) | |
download | rustc-upstream/1.69.0+dfsg1.tar.xz rustc-upstream/1.69.0+dfsg1.zip |
Adding upstream version 1.69.0+dfsg1.upstream/1.69.0+dfsg1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | tests/ui/span/regions-escape-loop-via-vec.stderr | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/tests/ui/span/regions-escape-loop-via-vec.stderr b/tests/ui/span/regions-escape-loop-via-vec.stderr index 2b6493077..532ac3606 100644 --- a/tests/ui/span/regions-escape-loop-via-vec.stderr +++ b/tests/ui/span/regions-escape-loop-via-vec.stderr @@ -2,7 +2,7 @@ error[E0503]: cannot use `x` because it was mutably borrowed --> $DIR/regions-escape-loop-via-vec.rs:5:11 | LL | let mut _y = vec![&mut x]; - | ------ borrow of `x` occurs here + | ------ `x` is borrowed here LL | while x < 10 { | ^ use of borrowed `x` LL | let mut z = x; @@ -13,7 +13,7 @@ error[E0503]: cannot use `x` because it was mutably borrowed --> $DIR/regions-escape-loop-via-vec.rs:6:21 | LL | let mut _y = vec![&mut x]; - | ------ borrow of `x` occurs here + | ------ `x` is borrowed here LL | while x < 10 { LL | let mut z = x; | ^ use of borrowed `x` @@ -23,11 +23,10 @@ LL | _y.push(&mut z); error[E0597]: `z` does not live long enough --> $DIR/regions-escape-loop-via-vec.rs:7:17 | +LL | let mut z = x; + | ----- binding `z` declared here LL | _y.push(&mut z); - | --------^^^^^^- - | | | - | | borrowed value does not live long enough - | borrow later used here + | ^^^^^^ borrowed value does not live long enough ... LL | } | - `z` dropped here while still borrowed @@ -36,7 +35,7 @@ error[E0503]: cannot use `x` because it was mutably borrowed --> $DIR/regions-escape-loop-via-vec.rs:9:9 | LL | let mut _y = vec![&mut x]; - | ------ borrow of `x` occurs here + | ------ `x` is borrowed here ... LL | _y.push(&mut z); | --------------- borrow later used here |