3397fa4701
Issue #1076
16 lines
265 B
Rust
16 lines
265 B
Rust
// This is what the signature to spawn should look like with bare functions
|
|
|
|
fn spawn<uniq T>(val: T, f: fn(T)) {
|
|
f(val);
|
|
}
|
|
|
|
fn f(&&i: int) {
|
|
assert i == 100;
|
|
}
|
|
|
|
fn main() {
|
|
spawn(100, f);
|
|
spawn(100, fn(&&i: int) {
|
|
assert i == 100;
|
|
});
|
|
} |