rust/tests/ui/impl-trait/suggest-calling-rpit-closure.rs

13 lines
151 B
Rust
Raw Normal View History

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