2024-09-05 19:52:32 -05:00
|
|
|
#![feature(coverage_attribute)]
|
|
|
|
#![feature(noop_waker)]
|
2024-09-06 00:41:10 -05:00
|
|
|
#![coverage(off)]
|
2024-09-05 19:52:32 -05:00
|
|
|
//@ edition: 2021
|
|
|
|
|
2024-09-06 00:41:10 -05:00
|
|
|
//@ aux-build: executor.rs
|
|
|
|
extern crate executor;
|
2024-09-05 19:52:32 -05:00
|
|
|
|
2024-09-06 00:41:10 -05:00
|
|
|
async fn ready() -> u8 {
|
|
|
|
1
|
|
|
|
}
|
|
|
|
|
|
|
|
#[coverage(on)]
|
|
|
|
#[rustfmt::skip]
|
2024-09-05 19:52:32 -05:00
|
|
|
async fn await_ready() -> u8 {
|
2024-09-05 17:25:25 -05:00
|
|
|
// await should be covered even if the function never yields
|
2024-09-05 19:52:32 -05:00
|
|
|
ready()
|
|
|
|
.await
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let mut future = Box::pin(await_ready());
|
|
|
|
executor::block_on(future.as_mut());
|
|
|
|
}
|