]> git.lizzy.rs Git - rust.git/blob - src/test/ui/moves/moves-based-on-type-block-bad.stderr
Rollup merge of #59940 - GuillaumeGomez:rustdoc-test, r=ollie27
[rust.git] / src / test / ui / moves / moves-based-on-type-block-bad.stderr
1 error[E0507]: cannot move out of borrowed content
2   --> $DIR/moves-based-on-type-block-bad.rs:22:19
3    |
4 LL |             match hellothere.x {
5    |                   ^^^^^^^^^^^^
6    |                   |
7    |                   cannot move out of borrowed content
8    |                   help: consider borrowing here: `&hellothere.x`
9 ...
10 LL |                 box E::Bar(x) => println!("{}", x.to_string()),
11    |                            - data moved here
12    |
13 note: move occurs because `x` has type `std::boxed::Box<isize>`, which does not implement the `Copy` trait
14   --> $DIR/moves-based-on-type-block-bad.rs:25:28
15    |
16 LL |                 box E::Bar(x) => println!("{}", x.to_string()),
17    |                            ^
18
19 error: aborting due to previous error
20
21 For more information about this error, try `rustc --explain E0507`.