summaryrefslogtreecommitdiffstats
path: root/src/test/ui/borrowck/borrowck-move-out-from-array.stderr
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/borrowck/borrowck-move-out-from-array.stderr')
-rw-r--r--src/test/ui/borrowck/borrowck-move-out-from-array.stderr40
1 files changed, 40 insertions, 0 deletions
diff --git a/src/test/ui/borrowck/borrowck-move-out-from-array.stderr b/src/test/ui/borrowck/borrowck-move-out-from-array.stderr
index 363effcfe..dd456681f 100644
--- a/src/test/ui/borrowck/borrowck-move-out-from-array.stderr
+++ b/src/test/ui/borrowck/borrowck-move-out-from-array.stderr
@@ -7,6 +7,10 @@ LL | let [.., _y] = a;
| ^^ value used here after move
|
= note: move occurs because `a[..]` has type `(String, String)`, which does not implement the `Copy` trait
+help: borrow this binding in the pattern to avoid moving the value
+ |
+LL | let [_, _, ref _x] = a;
+ | +++
error[E0382]: use of partially moved value: `a[..]`
--> $DIR/borrowck-move-out-from-array.rs:16:14
@@ -17,6 +21,10 @@ LL | let [.., _y] = a;
| ^^ value used here after partial move
|
= note: partial move occurs because `a[..].0` has type `String`, which does not implement the `Copy` trait
+help: borrow this binding in the pattern to avoid moving the value
+ |
+LL | let [_, _, (ref _x, _)] = a;
+ | +++
error[E0382]: use of moved value: `a[..].0`
--> $DIR/borrowck-move-out-from-array.rs:22:15
@@ -27,6 +35,10 @@ LL | let [.., (_y, _)] = a;
| ^^ value used here after move
|
= note: move occurs because `a[..].0` has type `String`, which does not implement the `Copy` trait
+help: borrow this binding in the pattern to avoid moving the value
+ |
+LL | let [_, _, (ref _x, _)] = a;
+ | +++
error[E0382]: use of partially moved value: `a`
--> $DIR/borrowck-move-out-from-array.rs:30:10
@@ -37,6 +49,10 @@ LL | let [_y @ .., _, _] = a;
| ^^ value used here after partial move
|
= note: partial move occurs because `a[..]` has type `(String, String)`, which does not implement the `Copy` trait
+help: borrow this binding in the pattern to avoid moving the value
+ |
+LL | let [ref _x, _, _] = a;
+ | +++
error[E0382]: use of partially moved value: `a`
--> $DIR/borrowck-move-out-from-array.rs:36:16
@@ -47,6 +63,10 @@ LL | let [_, _, _y @ ..] = a;
| ^^ value used here after partial move
|
= note: partial move occurs because `a[..]` has type `(String, String)`, which does not implement the `Copy` trait
+help: borrow this binding in the pattern to avoid moving the value
+ |
+LL | let [.., ref _x] = a;
+ | +++
error[E0382]: use of partially moved value: `a`
--> $DIR/borrowck-move-out-from-array.rs:42:10
@@ -57,6 +77,10 @@ LL | let [_y @ .., _, _] = a;
| ^^ value used here after partial move
|
= note: partial move occurs because `a[..].0` has type `String`, which does not implement the `Copy` trait
+help: borrow this binding in the pattern to avoid moving the value
+ |
+LL | let [(ref _x, _), _, _] = a;
+ | +++
error[E0382]: use of partially moved value: `a`
--> $DIR/borrowck-move-out-from-array.rs:48:16
@@ -67,6 +91,10 @@ LL | let [_, _, _y @ ..] = a;
| ^^ value used here after partial move
|
= note: partial move occurs because `a[..].0` has type `String`, which does not implement the `Copy` trait
+help: borrow this binding in the pattern to avoid moving the value
+ |
+LL | let [.., (ref _x, _)] = a;
+ | +++
error[E0382]: use of moved value: `a[..].0`
--> $DIR/borrowck-move-out-from-array.rs:54:11
@@ -77,6 +105,10 @@ LL | let [(_x, _), _, _] = a;
| ^^ value used here after move
|
= note: move occurs because `a[..]` has type `(String, String)`, which does not implement the `Copy` trait
+help: borrow this binding in the pattern to avoid moving the value
+ |
+LL | let [ref _y @ .., _, _] = a;
+ | +++
error[E0382]: use of moved value: `a[..].0`
--> $DIR/borrowck-move-out-from-array.rs:60:15
@@ -87,6 +119,10 @@ LL | let [.., (_x, _)] = a;
| ^^ value used here after move
|
= note: move occurs because `a[..]` has type `(String, String)`, which does not implement the `Copy` trait
+help: borrow this binding in the pattern to avoid moving the value
+ |
+LL | let [_, _, ref _y @ ..] = a;
+ | +++
error[E0382]: use of partially moved value: `a`
--> $DIR/borrowck-move-out-from-array.rs:68:13
@@ -97,6 +133,10 @@ LL | let [_, _y @ ..] = a;
| ^^ value used here after partial move
|
= note: partial move occurs because `a[..]` has type `(String, String)`, which does not implement the `Copy` trait
+help: borrow this binding in the pattern to avoid moving the value
+ |
+LL | let [ref x @ .., _] = a;
+ | +++
error: aborting due to 10 previous errors