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
24
tests/coverage/async_closure.coverage
Normal file
24
tests/coverage/async_closure.coverage
Normal file
|
@ -0,0 +1,24 @@
|
|||
LL| |#![feature(async_closure)]
|
||||
LL| |//@ edition: 2021
|
||||
LL| |
|
||||
LL| |//@ aux-build: executor.rs
|
||||
LL| |extern crate executor;
|
||||
LL| |
|
||||
LL| 1|async fn call_once(f: impl async FnOnce()) {
|
||||
LL| 1| f().await;
|
||||
LL| 1|}
|
||||
LL| |
|
||||
LL| 1|pub fn main() {
|
||||
LL| 2| let async_closure = async || {};
|
||||
^1
|
||||
------------------
|
||||
| async_closure::main::{closure#0}:
|
||||
| LL| 1| let async_closure = async || {};
|
||||
------------------
|
||||
| async_closure::main::{closure#0}::{closure#1}::<i32>:
|
||||
| LL| 1| let async_closure = async || {};
|
||||
------------------
|
||||
LL| 1| executor::block_on(async_closure());
|
||||
LL| 1| executor::block_on(call_once(async_closure));
|
||||
LL| 1|}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue