rust/tests/ui/closures/add_semicolon_non_block_closure.rs

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

12 lines
171 B
Rust
Raw Normal View History

fn foo(_f: impl Fn()) {}
fn bar() -> i32 {
1
}
fn main() {
foo(|| bar())
//~^ ERROR mismatched types [E0308]
//~| HELP consider using a semicolon here
}