summaryrefslogtreecommitdiffstats
path: root/tests/ui/span/regions-escape-loop-via-vec.stderr
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/span/regions-escape-loop-via-vec.stderr')
-rw-r--r--tests/ui/span/regions-escape-loop-via-vec.stderr10
1 files changed, 6 insertions, 4 deletions
diff --git a/tests/ui/span/regions-escape-loop-via-vec.stderr b/tests/ui/span/regions-escape-loop-via-vec.stderr
index 532ac3606..18c6cd480 100644
--- a/tests/ui/span/regions-escape-loop-via-vec.stderr
+++ b/tests/ui/span/regions-escape-loop-via-vec.stderr
@@ -7,7 +7,7 @@ LL | while x < 10 {
| ^ use of borrowed `x`
LL | let mut z = x;
LL | _y.push(&mut z);
- | --------------- borrow later used here
+ | -- borrow later used here
error[E0503]: cannot use `x` because it was mutably borrowed
--> $DIR/regions-escape-loop-via-vec.rs:6:21
@@ -18,7 +18,7 @@ LL | while x < 10 {
LL | let mut z = x;
| ^ use of borrowed `x`
LL | _y.push(&mut z);
- | --------------- borrow later used here
+ | -- borrow later used here
error[E0597]: `z` does not live long enough
--> $DIR/regions-escape-loop-via-vec.rs:7:17
@@ -26,7 +26,9 @@ error[E0597]: `z` does not live long enough
LL | let mut z = x;
| ----- binding `z` declared here
LL | _y.push(&mut z);
- | ^^^^^^ borrowed value does not live long enough
+ | -- ^^^^^^ borrowed value does not live long enough
+ | |
+ | borrow later used here
...
LL | }
| - `z` dropped here while still borrowed
@@ -38,7 +40,7 @@ LL | let mut _y = vec![&mut x];
| ------ `x` is borrowed here
...
LL | _y.push(&mut z);
- | --------------- borrow later used here
+ | -- borrow later used here
LL |
LL | x += 1;
| ^^^^^^ use of borrowed `x`