1 // run-pass
2 
3 #![allow(non_snake_case)]
4 
asBlock<F>(f: F) -> usize where F: FnOnce() -> usize5 fn asBlock<F>(f: F) -> usize where F: FnOnce() -> usize {
6    return f();
7 }
8 
main()9 pub fn main() {
10    let x = asBlock(|| 22);
11    assert_eq!(x, 22);
12 }
13