1
Fork 0

Make async closures test use async bound modifier

This commit is contained in:
Michael Goulet 2024-02-06 17:41:48 +00:00
parent 4a2fe4491e
commit f1308783b4
8 changed files with 20 additions and 30 deletions

View file

@ -5,17 +5,15 @@
// 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)]
#![feature(async_closure)]
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()) {
async fn needs_async_fn_mut(mut x: impl async FnMut()) {
x().await;
}
needs_async_fn_mut(x).await;