rust/src/test/ui/pattern/bindings-after-at/borrowck-move-and-move.stderr

85 lines
3.0 KiB
Plaintext
Raw Normal View History

error[E0382]: use of moved value
2020-08-30 13:59:56 -05:00
--> $DIR/borrowck-move-and-move.rs:13:13
|
LL | let a @ b = U;
| ----^ - move occurs because value has type `U`, which does not implement the `Copy` trait
| | |
| | value used here after move
| value moved here
error[E0382]: use of moved value
2020-08-30 13:59:56 -05:00
--> $DIR/borrowck-move-and-move.rs:15:17
|
LL | let a @ (b, c) = (U, U);
| --------^- ------ move occurs because value has type `(U, U)`, which does not implement the `Copy` trait
| | |
| | value used here after move
| value moved here
error[E0382]: use of moved value
2020-08-30 13:59:56 -05:00
--> $DIR/borrowck-move-and-move.rs:17:17
|
LL | let a @ (b, c) = (u(), u());
| --------^- ---------- move occurs because value has type `(U, U)`, which does not implement the `Copy` trait
| | |
| | value used here after move
| value moved here
error[E0382]: use of moved value
2020-08-30 13:59:56 -05:00
--> $DIR/borrowck-move-and-move.rs:20:16
|
LL | match Ok(U) {
| ----- move occurs because value has type `std::result::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
2020-08-30 13:59:56 -05:00
--> $DIR/borrowck-move-and-move.rs:20:29
|
LL | match Ok(U) {
| ----- move occurs because value has type `std::result::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
2020-08-30 13:59:56 -05:00
--> $DIR/borrowck-move-and-move.rs:27:22
|
LL | match [u(), u(), u(), u()] {
| -------------------- move occurs because value has type `[U; 4]`, which does not implement the `Copy` trait
LL | xs @ [a, .., b] => {}
| -------------^-
| | |
| | value used here after move
| value moved here
error[E0382]: use of moved value
2020-08-30 13:59:56 -05:00
--> $DIR/borrowck-move-and-move.rs:31:18
|
LL | match [u(), u(), u(), u()] {
| -------------------- move occurs because value has type `[U; 4]`, which does not implement the `Copy` trait
LL | xs @ [_, ys @ .., _] => {}
| ---------^^^^^^^----
| | |
| | value used here after move
| value moved here
error[E0382]: use of moved value
2020-08-30 13:59:56 -05:00
--> $DIR/borrowck-move-and-move.rs:24:16
|
LL | fn fun(a @ b: U) {}
| ----^
| | |
| | value used here after move
| value moved here
| 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`.