blob: 383b89afaa75ecad233fb25327303b3ef48a1fae [file] [log] [blame]
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`.