rust/src/test/ui/liveness/liveness-use-after-move.stderr

14 lines
486 B
Plaintext
Raw Normal View History

error[E0382]: borrow of moved value: `x`
2018-12-25 09:56:47 -06:00
--> $DIR/liveness-use-after-move.rs:6:20
2018-08-08 07:28:26 -05:00
|
LL | let x: Box<_> = box 5;
| - move occurs because `x` has type `std::boxed::Box<i32>`, which does not implement the `Copy` trait
2018-08-08 07:28:26 -05:00
LL | let y = x;
| - value moved here
2019-03-09 06:03:44 -06:00
LL | println!("{}", *x);
| ^^ value borrowed here after move
2018-08-08 07:28:26 -05:00
error: aborting due to previous error
For more information about this error, try `rustc --explain E0382`.