mirror of
https://github.com/rust-lang/rust.git
synced 2025-01-09 06:16:06 +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
|
|
}
|