783bad4295
By introducing a new map that tracks the errors reported and the `Place`s that spawned those errors against the move out that the error was referring to, we are able to silence duplicate errors by emitting only the error which corresponds to the most specific `Place` (that which other `Place`s which reported errors are prefixes of). This generally is an improvement, however there is a case - `liveness-move-in-while` - where the output regresses.
17 lines
628 B
Plaintext
17 lines
628 B
Plaintext
error[E0382]: borrow of moved value: `arc_v`
|
|
--> $DIR/no-capture-arc.rs:24:18
|
|
|
|
|
LL | thread::spawn(move|| {
|
|
| ------ value moved into closure here
|
|
LL | assert_eq!((*arc_v)[3], 4);
|
|
| ----- variable moved due to use in closure
|
|
...
|
|
LL | assert_eq!((*arc_v)[2], 3);
|
|
| ^^^^^ value borrowed here after move
|
|
|
|
|
= note: move occurs because `arc_v` has type `std::sync::Arc<std::vec::Vec<i32>>`, which does not implement the `Copy` trait
|
|
|
|
error: aborting due to previous error
|
|
|
|
For more information about this error, try `rustc --explain E0382`.
|