1
Fork 0
rust/tests/ui/threads-sendsync/sendfn-is-a-block.rs

14 lines
170 B
Rust
Raw Normal View History

//@ run-pass
fn test<F>(f: F) -> usize
where
F: FnOnce(usize) -> usize,
{
return f(22);
}
pub fn main() {
let y = test(|x| 4 * x);
assert_eq!(y, 88);
}