Dont ICE when computing coverage of synthetic async closure body
This commit is contained in:
parent
e7c0d27507
commit
cdbf28af76
7 changed files with 102 additions and 19 deletions
15
tests/coverage/async_closure.rs
Normal file
15
tests/coverage/async_closure.rs
Normal 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));
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue