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

97 lines
3.3 KiB
Plaintext
Raw Normal View History

error[E0382]: use of moved value
--> $DIR/borrowck-move-and-move.rs:13: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:15:9
|
LL | let a @ (b, c) = (U, U);
2020-11-02 10:59:20 -06:00
| ^^^^^^^^-^
| | |
| | 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:17:9
|
LL | let a @ (b, c) = (u(), u());
2020-11-02 10:59:20 -06:00
| ^^^^^^^^-^
| | |
| | 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:20:9
|
LL | a @ Ok(b) | a @ Err(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
help: borrow this field in the pattern to avoid moving the value
|
LL | a @ Ok(ref b) | a @ Err(b) => {}
| ^^^
error[E0382]: use of partially moved value
--> $DIR/borrowck-move-and-move.rs:20:21
|
LL | a @ Ok(b) | a @ Err(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
help: borrow this field in the pattern to avoid moving the value
|
LL | a @ Ok(b) | a @ Err(ref b) => {}
| ^^^
error[E0382]: use of partially moved value
--> $DIR/borrowck-move-and-move.rs:27:9
|
LL | xs @ [a, .., b] => {}
2020-11-02 10:59:20 -06:00
| ^^^^^^^^^^^^^-^
| | |
| | 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:31: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:24: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`.