blob: 0d46fe220876a4336ffa75195d76a093e0f8432c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
// run-pass
// This is what the signature to spawn should look like with bare functions
fn spawn<T:Send>(val: T, f: fn(T)) {
f(val);
}
fn f(i: isize) {
assert_eq!(i, 100);
}
pub fn main() {
spawn(100, f);
}
|