]> git.lizzy.rs Git - rust.git/blob - src/test/ui/block-arg-call-as.rs
Auto merge of #75936 - sdroege:chunks-exact-construction-bounds-check, r=nagisa
[rust.git] / src / test / ui / block-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 }