]> git.lizzy.rs Git - rust.git/blob - tests/ui/moves/moves-based-on-type-block-bad.stderr
fn-trait-closure test now pass on new solver
[rust.git] / tests / ui / moves / moves-based-on-type-block-bad.stderr
1 error[E0507]: cannot move out of `hellothere.x` as enum variant `Bar` which is behind a shared reference
2   --> $DIR/moves-based-on-type-block-bad.rs:22:19
3    |
4 LL |             match hellothere.x {
5    |                   ^^^^^^^^^^^^
6 LL |                 box E::Foo(_) => {}
7 LL |                 box E::Bar(x) => println!("{}", x.to_string()),
8    |                            -
9    |                            |
10    |                            data moved here
11    |                            move occurs because `x` has type `Box<isize>`, which does not implement the `Copy` trait
12    |
13 help: consider borrowing here
14    |
15 LL |             match &hellothere.x {
16    |                   +
17
18 error: aborting due to previous error
19
20 For more information about this error, try `rustc --explain E0507`.