mirror of
https://git.proxmox.com/git/rustc
synced 2026-01-15 18:11:54 +00:00
16 lines
272 B
Rust
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
|
|
}
|