blob: 47fa0d4a437ba6cc3db8e3ef6836963698f1d183 [file] [log] [blame]
error[E0382]: use of moved value: `y`
--> $DIR/double-move.rs:20:22
|
LL | let y = *x;
| - move occurs because `y` has type `str`, which does not implement the `Copy` trait
LL | drop_unsized(y);
| - value moved here
LL | drop_unsized(y);
| ^ value used here after move
error[E0382]: use of moved value: `x`
--> $DIR/double-move.rs:26:22
|
LL | let _y = *x;
| -- value moved here
LL | drop_unsized(x);
| ^ value used here after partial move
|
= note: move occurs because `*x` has type `str`, which does not implement the `Copy` trait
error[E0382]: use of moved value: `*x`
--> $DIR/double-move.rs:32:18
|
LL | let x = "hello".to_owned().into_boxed_str();
| - move occurs because `x` has type `std::boxed::Box<str>`, which does not implement the `Copy` trait
LL | drop_unsized(x);
| - value moved here
LL | let _y = *x;
| ^^ value used here after move
error[E0382]: use of moved value: `y`
--> $DIR/double-move.rs:39:9
|
LL | let y = *x;
| - move occurs because `y` has type `str`, which does not implement the `Copy` trait
LL | y.foo();
| - value moved here
LL | y.foo();
| ^ value used here after move
error[E0382]: use of moved value: `*x`
--> $DIR/double-move.rs:45:9
|
LL | let _y = *x;
| -- value moved here
LL | x.foo();
| ^ value used here after move
|
= note: move occurs because `*x` has type `str`, which does not implement the `Copy` trait
error[E0382]: use of moved value: `*x`
--> $DIR/double-move.rs:51:18
|
LL | x.foo();
| - value moved here
LL | let _y = *x;
| ^^ value used here after move
|
= note: move occurs because `*x` has type `str`, which does not implement the `Copy` trait
error: aborting due to 6 previous errors
For more information about this error, try `rustc --explain E0382`.