summaryrefslogtreecommitdiffstats
path: root/tests/ui/borrowck/borrow-tuple-fields.stderr
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/borrowck/borrow-tuple-fields.stderr')
-rw-r--r--tests/ui/borrowck/borrow-tuple-fields.stderr4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/ui/borrowck/borrow-tuple-fields.stderr b/tests/ui/borrowck/borrow-tuple-fields.stderr
index befa751a6..d7d3efe49 100644
--- a/tests/ui/borrowck/borrow-tuple-fields.stderr
+++ b/tests/ui/borrowck/borrow-tuple-fields.stderr
@@ -1,6 +1,8 @@
error[E0505]: cannot move out of `x` because it is borrowed
--> $DIR/borrow-tuple-fields.rs:12:13
|
+LL | let x: (Box<_>, _) = (Box::new(1), 2);
+ | - binding `x` declared here
LL | let r = &x.0;
| ---- borrow of `x.0` occurs here
LL | let y = x;
@@ -32,6 +34,8 @@ LL | a.use_ref();
error[E0505]: cannot move out of `x` because it is borrowed
--> $DIR/borrow-tuple-fields.rs:28:13
|
+LL | let x = Foo(Box::new(1), 2);
+ | - binding `x` declared here
LL | let r = &x.0;
| ---- borrow of `x.0` occurs here
LL | let y = x;