]> git.lizzy.rs Git - rust.git/blob - src/test/ui/clone-with-exterior.rs
Auto merge of #81507 - weiznich:add_diesel_to_cargo_test, r=Mark-Simulacrum
[rust.git] / src / test / ui / clone-with-exterior.rs
1 // run-pass
2
3 #![allow(unused_must_use)]
4 // ignore-emscripten no threads support
5
6 #![feature(box_syntax)]
7
8 use std::thread;
9
10 struct Pair {
11     a: isize,
12     b: isize
13 }
14
15 pub fn main() {
16     let z: Box<_> = box Pair { a : 10, b : 12};
17
18     thread::spawn(move|| {
19         assert_eq!(z.a, 10);
20         assert_eq!(z.b, 12);
21     }).join();
22 }