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