14 lines
486 B
Plaintext
14 lines
486 B
Plaintext
error[E0382]: borrow of moved value: `x`
|
|
--> $DIR/liveness-use-after-move.rs:6:20
|
|
|
|
|
LL | let x: Box<_> = box 5;
|
|
| - move occurs because `x` has type `std::boxed::Box<i32>`, which does not implement the `Copy` trait
|
|
LL | let y = x;
|
|
| - value moved here
|
|
LL | println!("{}", *x);
|
|
| ^^ value borrowed here after move
|
|
|
|
error: aborting due to previous error
|
|
|
|
For more information about this error, try `rustc --explain E0382`.
|