rust/tests/ui/parser/issues/issue-22647.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

16 lines
272 B
Rust
Raw Normal View History

fn main() {
let caller<F> = |f: F| //~ ERROR expected one of `:`, `;`, `=`, `@`, or `|`, found `<`
where F: Fn() -> i32
{
let x = f();
println!("Y {}",x);
return x;
};
caller(bar_handler);
}
fn bar_handler() -> i32 {
5
}