]> git.lizzy.rs Git - rust.git/blob - src/test/ui/no-reuse-move-arc.stderr
Rollup merge of #53317 - estebank:abolish-ice, r=oli-obk
[rust.git] / src / test / ui / no-reuse-move-arc.stderr
1 error[E0382]: use of moved value: `arc_v`
2   --> $DIR/no-reuse-move-arc.rs:22:18
3    |
4 LL |     thread::spawn(move|| {
5    |                   ------ value moved (into closure) here
6 ...
7 LL |     assert_eq!((*arc_v)[2], 3); //~ ERROR use of moved value: `arc_v`
8    |                  ^^^^^ value used here after move
9    |
10    = note: move occurs because `arc_v` has type `std::sync::Arc<std::vec::Vec<i32>>`, which does not implement the `Copy` trait
11
12 error[E0382]: use of moved value: `arc_v`
13   --> $DIR/no-reuse-move-arc.rs:24:23
14    |
15 LL |     thread::spawn(move|| {
16    |                   ------ value moved (into closure) here
17 ...
18 LL |     println!("{:?}", *arc_v); //~ ERROR use of moved value: `arc_v`
19    |                       ^^^^^ value used here after move
20    |
21    = note: move occurs because `arc_v` has type `std::sync::Arc<std::vec::Vec<i32>>`, which does not implement the `Copy` trait
22
23 error: aborting due to 2 previous errors
24
25 For more information about this error, try `rustc --explain E0382`.