]> git.lizzy.rs Git - rust.git/blob - src/test/ui/threads-sendsync/spawn.rs
Merge commit '61667dedf55e3e5aa584f7ae2bd0471336b92ce9' into sync_cg_clif-2021-09-19
[rust.git] / src / test / ui / threads-sendsync / spawn.rs
1 // run-pass
2 // ignore-emscripten no threads support
3
4 use std::thread;
5
6 pub fn main() {
7     thread::spawn(move|| child(10)).join().ok().unwrap();
8 }
9
10 fn child(i: isize) { println!("{}", i); assert_eq!(i, 10); }