rust/src/test/run-pass/fn-bare-spawn.rs
2012-10-12 20:43:38 -07:00

14 lines
215 B
Rust

// This is what the signature to spawn should look like with bare functions
fn spawn<T: Send>(val: T, f: extern fn(T)) {
f(move val);
}
fn f(+i: int) {
assert i == 100;
}
fn main() {
spawn(100, f);
}