summaryrefslogtreecommitdiffstats
path: root/src/test/ui/pattern/bindings-after-at/borrowck-move-and-move.stderr
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/pattern/bindings-after-at/borrowck-move-and-move.stderr')
-rw-r--r--src/test/ui/pattern/bindings-after-at/borrowck-move-and-move.stderr31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/test/ui/pattern/bindings-after-at/borrowck-move-and-move.stderr b/src/test/ui/pattern/bindings-after-at/borrowck-move-and-move.stderr
index a227cc583..324897151 100644
--- a/src/test/ui/pattern/bindings-after-at/borrowck-move-and-move.stderr
+++ b/src/test/ui/pattern/bindings-after-at/borrowck-move-and-move.stderr
@@ -6,6 +6,11 @@ LL | let a @ b = U;
| | |
| | value moved here
| value used here after move
+ |
+help: borrow this binding in the pattern to avoid moving the value
+ |
+LL | let ref a @ ref b = U;
+ | +++ +++
error[E0382]: use of partially moved value
--> $DIR/borrowck-move-and-move.rs:13:9
@@ -16,6 +21,10 @@ LL | let a @ (b, c) = (U, U);
| value used here after partial move
|
= note: partial move occurs because value has type `U`, which does not implement the `Copy` trait
+help: borrow this binding in the pattern to avoid moving the value
+ |
+LL | let ref a @ (b, ref c) = (U, U);
+ | +++ +++
error[E0382]: use of partially moved value
--> $DIR/borrowck-move-and-move.rs:15:9
@@ -26,6 +35,10 @@ LL | let a @ (b, c) = (u(), u());
| value used here after partial move
|
= note: partial move occurs because value has type `U`, which does not implement the `Copy` trait
+help: borrow this binding in the pattern to avoid moving the value
+ |
+LL | let ref a @ (b, ref c) = (u(), u());
+ | +++ +++
error[E0382]: use of moved value
--> $DIR/borrowck-move-and-move.rs:18:16
@@ -36,6 +49,11 @@ LL | a @ Ok(b) | a @ Err(b) => {}
| - ^ value used here after move
| |
| value moved here
+ |
+help: borrow this binding in the pattern to avoid moving the value
+ |
+LL | ref a @ Ok(b) | a @ Err(b) => {}
+ | +++
error[E0382]: use of moved value
--> $DIR/borrowck-move-and-move.rs:18:29
@@ -46,6 +64,11 @@ LL | a @ Ok(b) | a @ Err(b) => {}
| - ^ value used here after move
| |
| value moved here
+ |
+help: borrow this binding in the pattern to avoid moving the value
+ |
+LL | a @ Ok(b) | ref a @ Err(b) => {}
+ | +++
error[E0382]: use of partially moved value
--> $DIR/borrowck-move-and-move.rs:25:9
@@ -56,6 +79,10 @@ LL | xs @ [a, .., b] => {}
| value used here after partial move
|
= note: partial move occurs because value has type `U`, which does not implement the `Copy` trait
+help: borrow this binding in the pattern to avoid moving the value
+ |
+LL | ref xs @ [a, .., ref b] => {}
+ | +++ +++
error[E0382]: use of partially moved value
--> $DIR/borrowck-move-and-move.rs:29:9
@@ -66,6 +93,10 @@ LL | xs @ [_, ys @ .., _] => {}
| value used here after partial move
|
= note: partial move occurs because value has type `U`, which does not implement the `Copy` trait
+help: borrow this binding in the pattern to avoid moving the value
+ |
+LL | ref xs @ [_, ref ys @ .., _] => {}
+ | +++ +++
error[E0382]: use of moved value
--> $DIR/borrowck-move-and-move.rs:22:12