mirror of
https://github.com/rust-lang/rust.git
synced 2025-06-21 20:17:55 +00:00
8 lines
190 B
Rust
8 lines
190 B
Rust
//@ edition:2021
|
|
|
|
fn main() {
|
|
fn needs_fn(x: impl FnOnce()) {}
|
|
needs_fn(async || {});
|
|
//~^ ERROR expected `{async closure@is-not-fn.rs:5:14}` to be a closure that returns `()`
|
|
}
|