2024-01-29 11:41:51 -06:00
|
|
|
// aux-build:block-on.rs
|
|
|
|
// edition:2021
|
|
|
|
// run-pass
|
|
|
|
|
2024-02-06 11:41:48 -06:00
|
|
|
#![feature(async_closure)]
|
2024-01-29 11:41:51 -06:00
|
|
|
|
|
|
|
extern crate block_on;
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
block_on::block_on(async {
|
|
|
|
let x = async || {};
|
|
|
|
|
2024-02-06 11:41:48 -06:00
|
|
|
async fn needs_async_fn_mut(mut x: impl async FnMut()) {
|
2024-01-29 11:41:51 -06:00
|
|
|
x().await;
|
|
|
|
}
|
|
|
|
needs_async_fn_mut(x).await;
|
|
|
|
});
|
|
|
|
}
|