about summary refs log tree commit diff
path: root/tests/ui/threads-sendsync/spawn.rs
blob: c9f7c40ddb886568aee3199586d8a7c9227328c8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
//@ run-pass
//@ needs-threads

use std::thread;

pub fn main() {
    thread::spawn(move || child(10)).join().ok().unwrap();
}

fn child(i: isize) {
    println!("{}", i);
    assert_eq!(i, 10);
}