1
Fork 0

Flesh out a few more tests

This commit is contained in:
Michael Goulet 2024-02-26 23:06:38 +00:00
parent 2252ff7302
commit c8e3f35eb6
4 changed files with 36 additions and 9 deletions

View file

@ -8,11 +8,15 @@ extern crate block_on;
fn main() {
block_on::block_on(async {
let x = async || {};
async fn needs_async_fn_once(x: impl async FnOnce()) {
x().await;
}
needs_async_fn_once(x).await;
needs_async_fn_once(async || {}).await;
needs_async_fn_once(|| async {}).await;
async fn foo() {}
needs_async_fn_once(foo).await;
});
}