2024-02-16 14:02:50 -06:00
|
|
|
//@ edition:2021
|
2024-01-25 11:43:35 -06:00
|
|
|
|
|
|
|
#![feature(async_closure)]
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
fn needs_fn(x: impl FnOnce()) {}
|
|
|
|
needs_fn(async || {});
|
2024-02-10 16:43:35 -06:00
|
|
|
//~^ ERROR expected `{async closure@is-not-fn.rs:7:14}` to be a closure that returns `()`
|
2024-01-25 11:43:35 -06:00
|
|
|
}
|