]> git.lizzy.rs Git - rust.git/blob - src/test/ui/threads-sendsync/sendfn-is-a-block.rs
Merge commit 'e18101137866b79045fee0ef996e696e68c920b4' into clippyup
[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 }