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