rust/tests/ui/async-await/async-closures/is-not-fn.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

11 lines
295 B
Rust
Raw Normal View History

2024-01-25 17:43:35 +00:00
//@ edition:2021
//@ revisions: current next
//@ ignore-compare-mode-next-solver (explicit revisions)
//@[next] compile-flags: -Znext-solver
2024-01-25 17:43:35 +00:00
fn main() {
fn needs_fn(x: impl FnOnce()) {}
needs_fn(async || {});
//~^ ERROR expected `{async closure@is-not-fn.rs:8:14}` to return `()`
2024-01-25 17:43:35 +00:00
}