]> git.lizzy.rs Git - rust.git/blob - tests/ui/moves/moves-based-on-type-tuple.stderr
Rollup merge of #106446 - bzEq:fix-unwind-lsda, r=Amanieu
[rust.git] / tests / ui / moves / moves-based-on-type-tuple.stderr
1 error[E0382]: use of moved value: `x`
2   --> $DIR/moves-based-on-type-tuple.rs:4:18
3    |
4 LL | fn dup(x: Box<isize>) -> Box<(Box<isize>,Box<isize>)> {
5    |        - move occurs because `x` has type `Box<isize>`, which does not implement the `Copy` trait
6 ...
7 LL |     Box::new((x, x))
8    |               -  ^ value used here after move
9    |               |
10    |               value moved here
11    |
12 help: consider cloning the value if the performance cost is acceptable
13    |
14 LL |     Box::new((x.clone(), x))
15    |                ++++++++
16
17 error: aborting due to previous error
18
19 For more information about this error, try `rustc --explain E0382`.