mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-27 22:34:14 +00:00
12 lines
171 B
Rust
12 lines
171 B
Rust
![]() |
fn foo(_f: impl Fn()) {}
|
||
|
|
||
|
fn bar() -> i32 {
|
||
|
1
|
||
|
}
|
||
|
|
||
|
fn main() {
|
||
|
foo(|| bar())
|
||
|
//~^ ERROR mismatched types [E0308]
|
||
|
//~| HELP consider using a semicolon here
|
||
|
}
|