rust/tests/ui/parser/issues/issue-22647.rs
2023-08-01 23:30:40 +08:00

16 lines
272 B
Rust

fn main() {
let caller<F> = |f: F| //~ ERROR generic args in patterns require the turbofish syntax
where F: Fn() -> i32
{
let x = f();
println!("Y {}",x);
return x;
};
caller(bar_handler);
}
fn bar_handler() -> i32 {
5
}