rust/src/test/ui/pattern/bindings-after-at/bind-by-move-neither-can-live-while-the-other-survives-1.stderr

65 lines
2.4 KiB
Plaintext
Raw Normal View History

warning: the feature `bindings_after_at` is incomplete and may cause the compiler to crash
--> $DIR/bind-by-move-neither-can-live-while-the-other-survives-1.rs:5:12
|
LL | #![feature(bindings_after_at)]
| ^^^^^^^^^^^^^^^^^
|
= note: `#[warn(incomplete_features)]` on by default
error[E0009]: cannot bind by-move and by-ref in the same pattern
--> $DIR/bind-by-move-neither-can-live-while-the-other-survives-1.rs:13:23
|
LL | Some(ref _y @ _z) => { },
| ---------^^
| | |
| | by-move pattern here
| by-ref pattern here
error[E0007]: cannot bind by-move with sub-bindings
--> $DIR/bind-by-move-neither-can-live-while-the-other-survives-1.rs:19:14
|
LL | Some(_z @ ref _y) => { },
| ^^^^^^^^^^^ binds an already bound by-move value by moving it
error[E0009]: cannot bind by-move and by-ref in the same pattern
--> $DIR/bind-by-move-neither-can-live-while-the-other-survives-1.rs:26:27
|
LL | Some(ref mut _y @ _z) => { },
| -------------^^
| | |
| | by-move pattern here
| by-ref pattern here
error[E0007]: cannot bind by-move with sub-bindings
--> $DIR/bind-by-move-neither-can-live-while-the-other-survives-1.rs:32:14
|
LL | Some(_z @ ref mut _y) => { },
| ^^^^^^^^^^^^^^^ binds an already bound by-move value by moving it
error[E0382]: borrow of moved value
--> $DIR/bind-by-move-neither-can-live-while-the-other-survives-1.rs:19:19
|
LL | Some(_z @ ref _y) => { },
| -----^^^^^^
| | |
| | value borrowed here after move
| value moved here
|
= note: move occurs because value has type `X`, which does not implement the `Copy` trait
error[E0382]: borrow of moved value
--> $DIR/bind-by-move-neither-can-live-while-the-other-survives-1.rs:32:19
|
LL | Some(_z @ ref mut _y) => { },
| -----^^^^^^^^^^
| | |
| | value borrowed here after move
| value moved here
|
= note: move occurs because value has type `X`, which does not implement the `Copy` trait
error: aborting due to 6 previous errors
Some errors have detailed explanations: E0007, E0009, E0382.
For more information about an error, try `rustc --explain E0007`.