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.

8 lines
190 B
Rust
Raw Normal View History

2024-01-25 17:43:35 +00:00
//@ edition:2021
fn main() {
fn needs_fn(x: impl FnOnce()) {}
needs_fn(async || {});
2024-11-06 17:53:59 +00:00
//~^ ERROR expected `{async closure@is-not-fn.rs:5:14}` to be a closure that returns `()`
2024-01-25 17:43:35 +00:00
}