summaryrefslogtreecommitdiffstats
path: root/src/test/ui/pattern/bindings-after-at/borrowck-move-and-move.stderr
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:02:58 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:02:58 +0000
commit698f8c2f01ea549d77d7dc3338a12e04c11057b9 (patch)
tree173a775858bd501c378080a10dca74132f05bc50 /src/test/ui/pattern/bindings-after-at/borrowck-move-and-move.stderr
parentInitial commit. (diff)
downloadrustc-698f8c2f01ea549d77d7dc3338a12e04c11057b9.tar.xz
rustc-698f8c2f01ea549d77d7dc3338a12e04c11057b9.zip
Adding upstream version 1.64.0+dfsg1.upstream/1.64.0+dfsg1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
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.stderr88
1 files changed, 88 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
new file mode 100644
index 000000000..8e00bf5c3
--- /dev/null
+++ b/src/test/ui/pattern/bindings-after-at/borrowck-move-and-move.stderr
@@ -0,0 +1,88 @@
+error[E0382]: use of moved value
+ --> $DIR/borrowck-move-and-move.rs:11:9
+ |
+LL | let a @ b = U;
+ | ^^^^- - move occurs because value has type `U`, which does not implement the `Copy` trait
+ | | |
+ | | value moved here
+ | value used here after move
+
+error[E0382]: use of partially moved value
+ --> $DIR/borrowck-move-and-move.rs:13:9
+ |
+LL | let a @ (b, c) = (U, U);
+ | ^^^^^^^^-^
+ | | |
+ | | value partially moved here
+ | value used here after partial move
+ |
+ = note: partial move occurs because value has type `U`, which does not implement the `Copy` trait
+
+error[E0382]: use of partially moved value
+ --> $DIR/borrowck-move-and-move.rs:15:9
+ |
+LL | let a @ (b, c) = (u(), u());
+ | ^^^^^^^^-^
+ | | |
+ | | value partially moved here
+ | value used here after partial move
+ |
+ = note: partial move occurs because value has type `U`, which does not implement the `Copy` trait
+
+error[E0382]: use of moved value
+ --> $DIR/borrowck-move-and-move.rs:18:16
+ |
+LL | match Ok(U) {
+ | ----- move occurs because value has type `Result<U, U>`, which does not implement the `Copy` trait
+LL | a @ Ok(b) | a @ Err(b) => {}
+ | -------^-
+ | | |
+ | | value used here after move
+ | value moved here
+
+error[E0382]: use of moved value
+ --> $DIR/borrowck-move-and-move.rs:18:29
+ |
+LL | match Ok(U) {
+ | ----- move occurs because value has type `Result<U, U>`, which does not implement the `Copy` trait
+LL | a @ Ok(b) | a @ Err(b) => {}
+ | --------^-
+ | | |
+ | | value used here after move
+ | value moved here
+
+error[E0382]: use of partially moved value
+ --> $DIR/borrowck-move-and-move.rs:25:9
+ |
+LL | xs @ [a, .., b] => {}
+ | ^^^^^^^^^^^^^-^
+ | | |
+ | | value partially moved here
+ | value used here after partial move
+ |
+ = note: partial move occurs because value has type `U`, which does not implement the `Copy` trait
+
+error[E0382]: use of partially moved value
+ --> $DIR/borrowck-move-and-move.rs:29:9
+ |
+LL | xs @ [_, ys @ .., _] => {}
+ | ^^^^^^^^^-------^^^^
+ | | |
+ | | value partially moved here
+ | value used here after partial move
+ |
+ = note: partial move occurs because value has type `U`, which does not implement the `Copy` trait
+
+error[E0382]: use of moved value
+ --> $DIR/borrowck-move-and-move.rs:22:12
+ |
+LL | fn fun(a @ b: U) {}
+ | ^^^^-
+ | | |
+ | | value moved here
+ | value used here after move
+ | move occurs because value has type `U`, which does not implement the `Copy` trait
+
+error: aborting due to 8 previous errors
+
+For more information about this error, try `rustc --explain E0382`.