summaryrefslogtreecommitdiffstats
path: root/tests/ui/borrowck/borrowck-move-out-from-array-no-overlap-match.stderr
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:03 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:03 +0000
commit64d98f8ee037282c35007b64c2649055c56af1db (patch)
tree5492bcf97fce41ee1c0b1cc2add283f3e66cdab0 /tests/ui/borrowck/borrowck-move-out-from-array-no-overlap-match.stderr
parentAdding debian version 1.67.1+dfsg1-1. (diff)
downloadrustc-64d98f8ee037282c35007b64c2649055c56af1db.tar.xz
rustc-64d98f8ee037282c35007b64c2649055c56af1db.zip
Merging upstream version 1.68.2+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/ui/borrowck/borrowck-move-out-from-array-no-overlap-match.stderr')
-rw-r--r--tests/ui/borrowck/borrowck-move-out-from-array-no-overlap-match.stderr138
1 files changed, 138 insertions, 0 deletions
diff --git a/tests/ui/borrowck/borrowck-move-out-from-array-no-overlap-match.stderr b/tests/ui/borrowck/borrowck-move-out-from-array-no-overlap-match.stderr
new file mode 100644
index 000000000..47429ea3e
--- /dev/null
+++ b/tests/ui/borrowck/borrowck-move-out-from-array-no-overlap-match.stderr
@@ -0,0 +1,138 @@
+error[E0382]: use of partially moved value: `a`
+ --> $DIR/borrowck-move-out-from-array-no-overlap-match.rs:17:11
+ |
+LL | [_, _, _x] => {}
+ | -- value partially moved here
+LL | }
+LL | match 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 | [_, _, ref _x] => {}
+ | +++
+
+error[E0382]: use of partially moved value: `a`
+ --> $DIR/borrowck-move-out-from-array-no-overlap-match.rs:28:11
+ |
+LL | [_, _, (_x, _)] => {}
+ | -- value partially moved here
+LL | }
+LL | match 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 | [_, _, (ref _x, _)] => {}
+ | +++
+
+error[E0382]: use of partially moved value: `a`
+ --> $DIR/borrowck-move-out-from-array-no-overlap-match.rs:41:11
+ |
+LL | [_x, _, _] => {}
+ | -- value partially moved here
+LL | }
+LL | match 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 | [ref _x, _, _] => {}
+ | +++
+
+error[E0382]: use of partially moved value: `a`
+ --> $DIR/borrowck-move-out-from-array-no-overlap-match.rs:52:11
+ |
+LL | [.., _x] => {}
+ | -- value partially moved here
+LL | }
+LL | match 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 | [.., ref _x] => {}
+ | +++
+
+error[E0382]: use of partially moved value: `a`
+ --> $DIR/borrowck-move-out-from-array-no-overlap-match.rs:63:11
+ |
+LL | [(_x, _), _, _] => {}
+ | -- value partially moved here
+LL | }
+LL | match 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 | [(ref _x, _), _, _] => {}
+ | +++
+
+error[E0382]: use of partially moved value: `a`
+ --> $DIR/borrowck-move-out-from-array-no-overlap-match.rs:74:11
+ |
+LL | [.., (_x, _)] => {}
+ | -- value partially moved here
+LL | }
+LL | match 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 | [.., (ref _x, _)] => {}
+ | +++
+
+error[E0382]: use of partially moved value: `a`
+ --> $DIR/borrowck-move-out-from-array-no-overlap-match.rs:85:11
+ |
+LL | [_, _y @ ..] => {}
+ | -- value partially moved here
+LL | }
+LL | match 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 | [_, ref _y @ ..] => {}
+ | +++
+
+error[E0382]: use of partially moved value: `a`
+ --> $DIR/borrowck-move-out-from-array-no-overlap-match.rs:96:11
+ |
+LL | [_y @ .., _] => {}
+ | -- value partially moved here
+LL | }
+LL | match 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 | [ref _y @ .., _] => {}
+ | +++
+
+error[E0382]: use of partially moved value: `a`
+ --> $DIR/borrowck-move-out-from-array-no-overlap-match.rs:109:11
+ |
+LL | [x @ .., _, _] => {}
+ | - value partially moved here
+LL | }
+LL | match 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 | [ref x @ .., _, _] => {}
+ | +++
+
+error: aborting due to 9 previous errors
+
+For more information about this error, try `rustc --explain E0382`.