1
Fork 0

Dont ICE when computing coverage of synthetic async closure body

This commit is contained in:
Michael Goulet 2024-10-16 16:09:41 -04:00 committed by Zalathar
parent e7c0d27507
commit cdbf28af76
7 changed files with 102 additions and 19 deletions

View file

@ -0,0 +1,15 @@
#![feature(async_closure)]
//@ edition: 2021
//@ aux-build: executor.rs
extern crate executor;
async fn call_once(f: impl async FnOnce()) {
f().await;
}
pub fn main() {
let async_closure = async || {};
executor::block_on(async_closure());
executor::block_on(call_once(async_closure));
}