Fix drop shim for AsyncFnOnce closure, AsyncFnMut shim for AsyncFn closure
This commit is contained in:
parent
c98d6994a3
commit
ca44416023
35 changed files with 595 additions and 67 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::AsyncFnMut;
|
||||
|
||||
fn main() {
|
||||
block_on::block_on(async {
|
||||
let x = async || {};
|
||||
|
||||
async fn needs_async_fn_mut(mut x: impl AsyncFnMut()) {
|
||||
x().await;
|
||||
}
|
||||
needs_async_fn_mut(x).await;
|
||||
});
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue