1
Fork 0
rust/tests/ui/async-await/async-closures/is-not-fn.rs
2024-02-08 15:46:00 +00:00

9 lines
221 B
Rust

// edition:2021
#![feature(async_closure)]
fn main() {
fn needs_fn(x: impl FnOnce()) {}
needs_fn(async || {});
//~^ ERROR expected `{coroutine-closure@is-not-fn.rs:7:14}` to be a closure that returns `()`
}