Switched from FxHashMap to BTreeMap to preserve ordering when iterating.
This commit is contained in:
parent
783bad4295
commit
88ca3412e2
2 changed files with 22 additions and 17 deletions
|
|
@ -26,19 +26,6 @@ LL | drop(x2); //~ ERROR cannot move `x2` into closure because it is bor
|
|||
LL | borrow(&*p2);
|
||||
| ---- borrow later used here
|
||||
|
||||
error[E0382]: use of moved value: `x2`
|
||||
--> $DIR/borrowck-multiple-captures.rs:35:19
|
||||
|
|
||||
LL | drop(x2);
|
||||
| -- value moved here
|
||||
LL | thread::spawn(move|| {
|
||||
| ^^^^^^ value used here after move
|
||||
LL | drop(x1); //~ ERROR capture of moved value: `x1`
|
||||
LL | drop(x2); //~ ERROR capture of moved value: `x2`
|
||||
| -- use occurs due to use in closure
|
||||
|
|
||||
= note: move occurs because `x2` has type `std::boxed::Box<i32>`, which does not implement the `Copy` trait
|
||||
|
||||
error[E0382]: use of moved value: `x1`
|
||||
--> $DIR/borrowck-multiple-captures.rs:35:19
|
||||
|
|
||||
|
|
@ -52,6 +39,19 @@ LL | drop(x1); //~ ERROR capture of moved value: `x1`
|
|||
|
|
||||
= note: move occurs because `x1` has type `std::boxed::Box<i32>`, which does not implement the `Copy` trait
|
||||
|
||||
error[E0382]: use of moved value: `x2`
|
||||
--> $DIR/borrowck-multiple-captures.rs:35:19
|
||||
|
|
||||
LL | drop(x2);
|
||||
| -- value moved here
|
||||
LL | thread::spawn(move|| {
|
||||
| ^^^^^^ value used here after move
|
||||
LL | drop(x1); //~ ERROR capture of moved value: `x1`
|
||||
LL | drop(x2); //~ ERROR capture of moved value: `x2`
|
||||
| -- use occurs due to use in closure
|
||||
|
|
||||
= note: move occurs because `x2` has type `std::boxed::Box<i32>`, which does not implement the `Copy` trait
|
||||
|
||||
error[E0382]: use of moved value: `x`
|
||||
--> $DIR/borrowck-multiple-captures.rs:46:14
|
||||
|
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue