]> git.lizzy.rs Git - rust.git/blob - tests/ui/closures/add_semicolon_non_block_closure.rs
Rollup merge of #106625 - Swatinem:ref/cov6, r=nagisa
[rust.git] / tests / ui / closures / add_semicolon_non_block_closure.rs
1 fn foo(_f: impl Fn()) {}
2
3 fn bar() -> i32 {
4     1
5 }
6
7 fn main() {
8     foo(|| bar())
9     //~^ ERROR mismatched types [E0308]
10     //~| HELP consider using a semicolon here
11 }