]> git.lizzy.rs Git - rust.git/blob - tests/ui/threads-sendsync/clone-with-exterior.rs
Auto merge of #106853 - TimNN:undo-remap, r=oli-obk
[rust.git] / tests / ui / threads-sendsync / clone-with-exterior.rs
1 // run-pass
2
3 #![allow(unused_must_use)]
4 // ignore-emscripten no threads support
5
6 use std::thread;
7
8 struct Pair {
9     a: isize,
10     b: isize
11 }
12
13 pub fn main() {
14     let z: Box<_> = Box::new(Pair { a : 10, b : 12});
15
16     thread::spawn(move|| {
17         assert_eq!(z.a, 10);
18         assert_eq!(z.b, 12);
19     }).join();
20 }