]>
git.proxmox.com Git - rustc.git/blob - src/test/ui/no-capture-arc.rs
1 // error-pattern: borrow of moved value
7 let v
= vec
![1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
8 let arc_v
= Arc
::new(v
);
10 thread
::spawn(move|| {
11 assert_eq
!((*arc_v
)[3], 4);
14 assert_eq
!((*arc_v
)[2], 3);
16 println
!("{:?}", *arc_v
);