]> git.lizzy.rs Git - rust.git/blob - tests/ui/closures/old-closure-arg-call-as.rs
Rollup merge of #106779 - RReverser:patch-2, r=Mark-Simulacrum
[rust.git] / tests / ui / closures / old-closure-arg-call-as.rs
1 // run-pass
2
3 #![allow(non_snake_case)]
4
5 fn asBlock<F>(f: F) -> usize where F: FnOnce() -> usize {
6    return f();
7 }
8
9 pub fn main() {
10    let x = asBlock(|| 22);
11    assert_eq!(x, 22);
12 }