summaryrefslogtreecommitdiffstats
path: root/src/test/ui/borrowck/borrowck-move-out-from-array.stderr
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:18:25 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:18:25 +0000
commit5363f350887b1e5b5dd21a86f88c8af9d7fea6da (patch)
tree35ca005eb6e0e9a1ba3bb5dbc033209ad445dc17 /src/test/ui/borrowck/borrowck-move-out-from-array.stderr
parentAdding debian version 1.66.0+dfsg1-1. (diff)
downloadrustc-5363f350887b1e5b5dd21a86f88c8af9d7fea6da.tar.xz
rustc-5363f350887b1e5b5dd21a86f88c8af9d7fea6da.zip
Merging upstream version 1.67.1+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
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