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