rust/tests/ui/impl-trait/suggest-calling-rpit-closure.rs
2023-01-11 09:32:08 +00:00

13 lines
151 B
Rust

fn whatever() -> i32 {
opaque()
//~^ ERROR mismatched types
}
fn opaque() -> impl Fn() -> i32 {
|| 0
}
fn main() {
let _ = whatever();
}