]> git.lizzy.rs Git - rust.git/blob - tests/ui/functions-closures/fn-bare-spawn.rs
Rollup merge of #107615 - notriddle:notriddle/nbsp, r=GuillaumeGomez
[rust.git] / tests / ui / functions-closures / fn-bare-spawn.rs
1 // run-pass
2 // This is what the signature to spawn should look like with bare functions
3
4
5 fn spawn<T:Send>(val: T, f: fn(T)) {
6     f(val);
7 }
8
9 fn f(i: isize) {
10     assert_eq!(i, 100);
11 }
12
13 pub fn main() {
14     spawn(100, f);
15 }