rust/tests/ui/async-await/async-closures/async-fn-mut-for-async-fn.rs

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

17 lines
298 B
Rust
Raw Permalink Normal View History

//@ aux-build:block-on.rs
//@ edition:2021
//@ run-pass
extern crate block_on;
fn main() {
block_on::block_on(async {
let x = async || {};
2024-11-04 18:59:57 +00:00
async fn needs_async_fn_mut(mut x: impl AsyncFnMut()) {
x().await;
}
needs_async_fn_mut(x).await;
});
}