summaryrefslogtreecommitdiffstats
path: root/tests/ui/borrowck/borrowck-field-sensitivity.stderr
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/borrowck/borrowck-field-sensitivity.stderr')
-rw-r--r--tests/ui/borrowck/borrowck-field-sensitivity.stderr4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/ui/borrowck/borrowck-field-sensitivity.stderr b/tests/ui/borrowck/borrowck-field-sensitivity.stderr
index e009f5913..11812847d 100644
--- a/tests/ui/borrowck/borrowck-field-sensitivity.stderr
+++ b/tests/ui/borrowck/borrowck-field-sensitivity.stderr
@@ -41,6 +41,8 @@ LL | let p = &x.b;
error[E0505]: cannot move out of `x.b` because it is borrowed
--> $DIR/borrowck-field-sensitivity.rs:34:10
|
+LL | let x = A { a: 1, b: Box::new(2) };
+ | - binding `x` declared here
LL | let p = &x.b;
| ---- borrow of `x.b` occurs here
LL | drop(x.b);
@@ -51,6 +53,8 @@ LL | drop(**p);
error[E0505]: cannot move out of `x.b` because it is borrowed
--> $DIR/borrowck-field-sensitivity.rs:41:14
|
+LL | let x = A { a: 1, b: Box::new(2) };
+ | - binding `x` declared here
LL | let p = &x.b;
| ---- borrow of `x.b` occurs here
LL | let _y = A { a: 3, .. x };