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

134 lines
4.8 KiB
Plaintext
Raw Normal View History

error[E0007]: cannot bind by-move with sub-bindings
2019-12-29 18:23:42 -06:00
--> $DIR/borrowck-move-and-move.rs:11:9
|
LL | let a @ b = U;
| ^^^^^ binds an already bound by-move value by moving it
error[E0007]: cannot bind by-move with sub-bindings
2019-12-29 18:23:42 -06:00
--> $DIR/borrowck-move-and-move.rs:15:9
|
LL | let a @ (b, c) = (U, U);
| ^^^^^^^^^^ binds an already bound by-move value by moving it
error[E0007]: cannot bind by-move with sub-bindings
2019-12-29 18:23:42 -06:00
--> $DIR/borrowck-move-and-move.rs:19:9
|
LL | let a @ (b, c) = (u(), u());
| ^^^^^^^^^^ binds an already bound by-move value by moving it
error[E0007]: cannot bind by-move with sub-bindings
2019-12-29 18:23:42 -06:00
--> $DIR/borrowck-move-and-move.rs:24:9
|
LL | a @ Ok(b) | a @ Err(b) => {}
| ^^^^^^^^^ binds an already bound by-move value by moving it
error[E0007]: cannot bind by-move with sub-bindings
2019-12-29 18:23:42 -06:00
--> $DIR/borrowck-move-and-move.rs:24:21
|
LL | a @ Ok(b) | a @ Err(b) => {}
| ^^^^^^^^^^ binds an already bound by-move value by moving it
error[E0007]: cannot bind by-move with sub-bindings
2019-12-29 18:23:42 -06:00
--> $DIR/borrowck-move-and-move.rs:36:9
|
LL | xs @ [a, .., b] => {}
| ^^^^^^^^^^^^^^^ binds an already bound by-move value by moving it
error[E0007]: cannot bind by-move with sub-bindings
2019-12-29 18:23:42 -06:00
--> $DIR/borrowck-move-and-move.rs:42:9
|
LL | xs @ [_, ys @ .., _] => {}
| ^^^^^^^^^^^^^^^^^^^^ binds an already bound by-move value by moving it
error[E0007]: cannot bind by-move with sub-bindings
2019-12-29 18:23:42 -06:00
--> $DIR/borrowck-move-and-move.rs:31:12
|
LL | fn fun(a @ b: U) {}
| ^^^^^ binds an already bound by-move value by moving it
error[E0382]: use of moved value
2019-12-29 18:23:42 -06:00
--> $DIR/borrowck-move-and-move.rs:11:13
|
LL | let a @ b = U;
| ----^ - move occurs because value has type `main::U`, which does not implement the `Copy` trait
| | |
| | value used here after move
| value moved here
error[E0382]: use of moved value
2019-12-29 18:23:42 -06:00
--> $DIR/borrowck-move-and-move.rs:15:17
|
LL | let a @ (b, c) = (U, U);
| --------^- ------ move occurs because value has type `(main::U, main::U)`, which does not implement the `Copy` trait
| | |
| | value used here after move
| value moved here
error[E0382]: use of moved value
2019-12-29 18:23:42 -06:00
--> $DIR/borrowck-move-and-move.rs:19:17
|
LL | let a @ (b, c) = (u(), u());
| --------^- ---------- move occurs because value has type `(main::U, main::U)`, which does not implement the `Copy` trait
| | |
| | value used here after move
| value moved here
error[E0382]: use of moved value
2019-12-29 18:23:42 -06:00
--> $DIR/borrowck-move-and-move.rs:24:16
|
LL | match Ok(U) {
| ----- move occurs because value has type `std::result::Result<main::U, main::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
2019-12-29 18:23:42 -06:00
--> $DIR/borrowck-move-and-move.rs:24:29
|
LL | match Ok(U) {
| ----- move occurs because value has type `std::result::Result<main::U, main::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
2019-12-29 18:23:42 -06:00
--> $DIR/borrowck-move-and-move.rs:36:22
|
LL | match [u(), u(), u(), u()] {
| -------------------- move occurs because value has type `[main::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
2019-12-29 18:23:42 -06:00
--> $DIR/borrowck-move-and-move.rs:42:18
|
LL | match [u(), u(), u(), u()] {
| -------------------- move occurs because value has type `[main::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
2019-12-29 18:23:42 -06:00
--> $DIR/borrowck-move-and-move.rs:31:16
|
LL | fn fun(a @ b: U) {}
| ----^
| | |
| | value used here after move
| value moved here
| move occurs because value has type `main::U`, which does not implement the `Copy` trait
error: aborting due to 16 previous errors
Some errors have detailed explanations: E0007, E0382.
For more information about an error, try `rustc --explain E0007`.