rust/src/test/ui/unsized-locals/double-move.stderr

64 lines
2.0 KiB
Plaintext
Raw Normal View History

error[E0382]: use of moved value: `y`
--> $DIR/double-move.rs:20:22
|
LL | drop_unsized(y);
| - value moved here
2019-03-09 06:03:44 -06:00
LL | drop_unsized(y);
| ^ value used here after move
|
= note: move occurs because `y` has type `str`, which does not implement the `Copy` trait
error[E0382]: use of moved value: `x`
--> $DIR/double-move.rs:26:22
|
LL | let _y = *x;
| -- value moved here
2019-03-09 06:03:44 -06:00
LL | drop_unsized(x);
| ^ 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:32:13
|
LL | drop_unsized(x);
| - value moved here
2019-03-09 06:03:44 -06:00
LL | let _y = *x;
| ^^ value used here after move
|
= note: move occurs because `x` has type `std::boxed::Box<str>`, which does not implement the `Copy` trait
error[E0382]: use of moved value: `y`
--> $DIR/double-move.rs:39:9
|
LL | y.foo();
| - value moved here
2019-03-09 06:03:44 -06:00
LL | y.foo();
| ^ value used here after move
|
= note: move occurs because `y` has type `str`, which does not implement the `Copy` trait
error[E0382]: use of moved value: `*x`
--> $DIR/double-move.rs:45:9
|
LL | let _y = *x;
| -- value moved here
2019-03-09 06:03:44 -06:00
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:13
|
LL | x.foo();
| - value moved here
2019-03-09 06:03:44 -06:00
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`.