test fix for #54015

This commit is contained in:
Rusty Blitzerr 2018-09-28 18:24:17 -07:00
parent 44b3674d8e
commit 671e77d60b
3 changed files with 33 additions and 0 deletions

View file

@ -0,0 +1,11 @@
error[E0382]: use of moved value: `x`
--> $DIR/liveness-move-call-arg.rs:19:14
|
LL | take(x); //~ ERROR use of moved value: `x`
| ^ value moved here, in previous iteration of loop
|
= note: move occurs because `x` has type `std::boxed::Box<isize>`, which does not implement the `Copy` trait
error: aborting due to previous error
For more information about this error, try `rustc --explain E0382`.

View file

@ -0,0 +1,11 @@
error[E0382]: use of moved value: `y`
--> $DIR/liveness-move-in-loop.rs:21:25
|
LL | x = y; //~ ERROR use of moved value
| ^ value moved here, in previous iteration of loop
|
= note: move occurs because `y` has type `std::boxed::Box<isize>`, which does not implement the `Copy` trait
error: aborting due to previous error
For more information about this error, try `rustc --explain E0382`.

View file

@ -0,0 +1,11 @@
error[E0382]: use of moved value: `x`
--> $DIR/move-in-guard-2.rs:20:24
|
LL | (_, 2) if take(x) => (), //~ ERROR use of moved value: `x`
| ^ value moved here, in previous iteration of loop
|
= note: move occurs because `x` has type `std::boxed::Box<i32>`, which does not implement the `Copy` trait
error: aborting due to previous error
For more information about this error, try `rustc --explain E0382`.