rust/tests/ui/traits/next-solver/fn-trait-closure.rs

9 lines
136 B
Rust

// compile-flags: -Znext-solver
// check-pass
fn require_fn(_: impl Fn() -> i32) {}
fn main() {
require_fn(|| -> i32 { 1i32 });
}