]>
git.proxmox.com Git - rustc.git/blob - src/test/run-pass/functions-closures/copy-closure.rs
2 // Check that closures implement `Copy`.
4 fn call
<T
, F
: FnOnce() -> T
>(f
: F
) -> T { f() }
9 println
!("Hello {}", a
);
13 assert_eq
!(5, call(hello
.clone()));
14 assert_eq
!(5, call(hello
));
15 assert_eq
!(5, call(hello
));