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

82 lines
2.8 KiB
Plaintext
Raw Normal View History

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
2020-11-03 00:45:41 -06:00
error[E0382]: use of moved value
--> $DIR/borrowck-move-and-move.rs:18:16
|
2020-11-03 00:45:41 -06:00
LL | match Ok(U) {
2021-01-28 10:01:36 -06:00
| ----- 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
| |
2020-11-03 00:45:41 -06:00
| value moved here
2020-11-03 00:45:41 -06:00
error[E0382]: use of moved value
--> $DIR/borrowck-move-and-move.rs:18:29
|
2020-11-03 00:45:41 -06:00
LL | match Ok(U) {
2021-01-28 10:01:36 -06:00
| ----- 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
| |
2020-11-03 00:45:41 -06:00
| 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) {}
2022-09-08 09:44:45 -05:00
| ^ - 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`.