summaryrefslogtreecommitdiffstats
path: root/tests/ui/borrowck/borrowck-assign-comp.stderr
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/borrowck/borrowck-assign-comp.stderr')
-rw-r--r--tests/ui/borrowck/borrowck-assign-comp.stderr12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/ui/borrowck/borrowck-assign-comp.stderr b/tests/ui/borrowck/borrowck-assign-comp.stderr
index 2b7cef7b3..d35f2331a 100644
--- a/tests/ui/borrowck/borrowck-assign-comp.stderr
+++ b/tests/ui/borrowck/borrowck-assign-comp.stderr
@@ -2,10 +2,10 @@ error[E0506]: cannot assign to `p.x` because it is borrowed
--> $DIR/borrowck-assign-comp.rs:10:5
|
LL | let q = &p;
- | -- borrow of `p.x` occurs here
+ | -- `p.x` is borrowed here
...
LL | p.x = 5;
- | ^^^^^^^ assignment to borrowed `p.x` occurs here
+ | ^^^^^^^ `p.x` is assigned to here but it was already borrowed
LL | q.x;
| --- borrow later used here
@@ -13,9 +13,9 @@ error[E0506]: cannot assign to `p` because it is borrowed
--> $DIR/borrowck-assign-comp.rs:20:5
|
LL | let q = &p.y;
- | ---- borrow of `p` occurs here
+ | ---- `p` is borrowed here
LL | p = Point {x: 5, y: 7};
- | ^^^^^^^^^^^^^^^^^^^^^^ assignment to borrowed `p` occurs here
+ | ^^^^^^^^^^^^^^^^^^^^^^ `p` is assigned to here but it was already borrowed
LL | p.x; // silence warning
LL | *q; // stretch loan
| -- borrow later used here
@@ -24,9 +24,9 @@ error[E0506]: cannot assign to `p.y` because it is borrowed
--> $DIR/borrowck-assign-comp.rs:31:5
|
LL | let q = &p.y;
- | ---- borrow of `p.y` occurs here
+ | ---- `p.y` is borrowed here
LL | p.y = 5;
- | ^^^^^^^ assignment to borrowed `p.y` occurs here
+ | ^^^^^^^ `p.y` is assigned to here but it was already borrowed
LL | *q;
| -- borrow later used here