]> git.lizzy.rs Git - rust.git/blob - src/test/ui/threads-sendsync/sendfn-is-a-block.rs
Merge commit '0969bc6dde001e01e7e1f58c8ccd7750f8a49ae1' into sync_cg_clif-2021-03-29
[rust.git] / src / test / ui / threads-sendsync / sendfn-is-a-block.rs
1 // run-pass
2
3
4 fn test<F>(f: F) -> usize where F: FnOnce(usize) -> usize {
5     return f(22);
6 }
7
8 pub fn main() {
9     let y = test(|x| 4 * x);
10     assert_eq!(y, 88);
11 }