Skip to content

Commit 671e77d

Browse files
committed
test fix for #54015
1 parent 44b3674 commit 671e77d

File tree

3 files changed

+33
-0
lines changed

3 files changed

+33
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
error[E0382]: use of moved value: `x`
2+
--> $DIR/liveness-move-call-arg.rs:19:14
3+
|
4+
LL | take(x); //~ ERROR use of moved value: `x`
5+
| ^ value moved here, in previous iteration of loop
6+
|
7+
= note: move occurs because `x` has type `std::boxed::Box<isize>`, which does not implement the `Copy` trait
8+
9+
error: aborting due to previous error
10+
11+
For more information about this error, try `rustc --explain E0382`.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
error[E0382]: use of moved value: `y`
2+
--> $DIR/liveness-move-in-loop.rs:21:25
3+
|
4+
LL | x = y; //~ ERROR use of moved value
5+
| ^ value moved here, in previous iteration of loop
6+
|
7+
= note: move occurs because `y` has type `std::boxed::Box<isize>`, which does not implement the `Copy` trait
8+
9+
error: aborting due to previous error
10+
11+
For more information about this error, try `rustc --explain E0382`.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
error[E0382]: use of moved value: `x`
2+
--> $DIR/move-in-guard-2.rs:20:24
3+
|
4+
LL | (_, 2) if take(x) => (), //~ ERROR use of moved value: `x`
5+
| ^ value moved here, in previous iteration of loop
6+
|
7+
= note: move occurs because `x` has type `std::boxed::Box<i32>`, which does not implement the `Copy` trait
8+
9+
error: aborting due to previous error
10+
11+
For more information about this error, try `rustc --explain E0382`.

0 commit comments

Comments
 (0)