Add some tests
This commit is contained in:
parent
881b6b5149
commit
37184e86ea
24 changed files with 402 additions and 9 deletions
|
@ -0,0 +1,23 @@
|
|||
// aux-build:block-on.rs
|
||||
// edition:2021
|
||||
// run-pass
|
||||
|
||||
// FIXME(async_closures): When `fn_sig_for_fn_abi` is fixed, remove this.
|
||||
// ignore-pass (test emits codegen-time warnings)
|
||||
|
||||
#![feature(async_closure, async_fn_traits)]
|
||||
|
||||
extern crate block_on;
|
||||
|
||||
use std::ops::AsyncFnOnce;
|
||||
|
||||
fn main() {
|
||||
block_on::block_on(async {
|
||||
let x = async || {};
|
||||
|
||||
async fn needs_async_fn_once(x: impl AsyncFnOnce()) {
|
||||
x().await;
|
||||
}
|
||||
needs_async_fn_once(x).await;
|
||||
});
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue