mirror of
https://github.com/rust-lang/rust.git
synced 2025-10-28 11:38:01 +00:00
11 lines
314 B
Rust
11 lines
314 B
Rust
//@ edition:2021
|
|
//@ revisions: current next
|
|
//@ ignore-compare-mode-next-solver (explicit revisions)
|
|
//@[next] compile-flags: -Znext-solver
|
|
|
|
fn main() {
|
|
fn needs_fn(x: impl FnOnce()) {}
|
|
needs_fn(async || {});
|
|
//~^ ERROR expected `{async closure@is-not-fn.rs:8:14}` to be a closure that returns `()`
|
|
}
|