]> git.proxmox.com Git - rustc.git/blob - tests/ui/functions-closures/fn-bare-spawn.rs
New upstream version 1.68.2+dfsg1
[rustc.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 }