summaryrefslogtreecommitdiffstats
path: root/tests/ui/nll/closure-borrow-spans.stderr
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/nll/closure-borrow-spans.stderr')
-rw-r--r--tests/ui/nll/closure-borrow-spans.stderr28
1 files changed, 14 insertions, 14 deletions
diff --git a/tests/ui/nll/closure-borrow-spans.stderr b/tests/ui/nll/closure-borrow-spans.stderr
index cf0df5834..cac22c2ec 100644
--- a/tests/ui/nll/closure-borrow-spans.stderr
+++ b/tests/ui/nll/closure-borrow-spans.stderr
@@ -8,7 +8,7 @@ LL | let f = || x.len();
LL | let y = x;
| ^ move out of `x` occurs here
LL | f.use_ref();
- | ----------- borrow later used here
+ | - borrow later used here
error[E0502]: cannot borrow `x` as mutable because it is also borrowed as immutable
--> $DIR/closure-borrow-spans.rs:11:13
@@ -20,7 +20,7 @@ LL | let f = || x;
LL | let y = &mut x;
| ^^^^^^ mutable borrow occurs here
LL | f.use_ref();
- | ----------- immutable borrow later used here
+ | - immutable borrow later used here
error[E0597]: `x` does not live long enough
--> $DIR/closure-borrow-spans.rs:19:16
@@ -32,7 +32,7 @@ LL | f = || x;
LL | }
| - `x` dropped here while still borrowed
LL | f.use_ref();
- | ----------- borrow later used here
+ | - borrow later used here
error[E0506]: cannot assign to `x` because it is borrowed
--> $DIR/closure-borrow-spans.rs:26:5
@@ -44,7 +44,7 @@ LL | let f = || x;
LL | x = 1;
| ^^^^^ `x` is assigned to here but it was already borrowed
LL | f.use_ref();
- | ----------- borrow later used here
+ | - borrow later used here
error[E0503]: cannot use `x` because it was mutably borrowed
--> $DIR/closure-borrow-spans.rs:32:13
@@ -56,7 +56,7 @@ LL | let f = || x = 0;
LL | let y = x;
| ^ use of borrowed `x`
LL | f.use_ref();
- | ----------- borrow later used here
+ | - borrow later used here
error[E0502]: cannot borrow `x` as immutable because it is also borrowed as mutable
--> $DIR/closure-borrow-spans.rs:38:13
@@ -68,7 +68,7 @@ LL | let f = || x = 0;
LL | let y = &x;
| ^^ immutable borrow occurs here
LL | f.use_ref();
- | ----------- mutable borrow later used here
+ | - mutable borrow later used here
error[E0499]: cannot borrow `x` as mutable more than once at a time
--> $DIR/closure-borrow-spans.rs:44:13
@@ -80,7 +80,7 @@ LL | let f = || x = 0;
LL | let y = &mut x;
| ^^^^^^ second mutable borrow occurs here
LL | f.use_ref();
- | ----------- first borrow later used here
+ | - first borrow later used here
error[E0597]: `x` does not live long enough
--> $DIR/closure-borrow-spans.rs:52:16
@@ -92,7 +92,7 @@ LL | f = || x = 0;
LL | }
| - `x` dropped here while still borrowed
LL | f.use_ref();
- | ----------- borrow later used here
+ | - borrow later used here
error[E0506]: cannot assign to `x` because it is borrowed
--> $DIR/closure-borrow-spans.rs:59:5
@@ -104,7 +104,7 @@ LL | let f = || x = 0;
LL | x = 1;
| ^^^^^ `x` is assigned to here but it was already borrowed
LL | f.use_ref();
- | ----------- borrow later used here
+ | - borrow later used here
error[E0505]: cannot move out of `x` because it is borrowed
--> $DIR/closure-borrow-spans.rs:65:13
@@ -116,7 +116,7 @@ LL | let f = || *x = 0;
LL | let y = x;
| ^ move out of `x` occurs here
LL | f.use_ref();
- | ----------- borrow later used here
+ | - borrow later used here
error[E0501]: cannot borrow `x` as immutable because previous closure requires unique access
--> $DIR/closure-borrow-spans.rs:71:13
@@ -128,7 +128,7 @@ LL | let f = || *x = 0;
LL | let y = &x;
| ^^ second borrow occurs here
LL | f.use_ref();
- | ----------- first borrow later used here
+ | - first borrow later used here
error[E0501]: cannot borrow `x` as mutable because previous closure requires unique access
--> $DIR/closure-borrow-spans.rs:77:13
@@ -140,7 +140,7 @@ LL | let f = || *x = 0;
LL | let y = &mut x;
| ^^^^^^ second borrow occurs here
LL | f.use_ref();
- | ----------- first borrow later used here
+ | - first borrow later used here
error[E0597]: `x` does not live long enough
--> $DIR/closure-borrow-spans.rs:86:16
@@ -152,7 +152,7 @@ LL | f = || *x = 0;
LL | }
| - `x` dropped here while still borrowed
LL | f.use_ref();
- | ----------- borrow later used here
+ | - borrow later used here
error[E0506]: cannot assign to `*x` because it is borrowed
--> $DIR/closure-borrow-spans.rs:93:5
@@ -164,7 +164,7 @@ LL | let f = || *x = 0;
LL | *x = 1;
| ^^^^^^ `*x` is assigned to here but it was already borrowed
LL | f.use_ref();
- | ----------- borrow later used here
+ | - borrow later used here
error: aborting due to 14 previous errors