rust/src/test/run-pass/fn-bare-spawn.rs
2012-09-19 13:59:58 -07:00

14 lines
210 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(val);
}
fn f(+i: int) {
assert i == 100;
}
fn main() {
spawn(100, f);
}