mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-11 16:15:03 +00:00
72ce1ab42f
Co-authored-by: zachs18 <8355914+zachs18@users.noreply.github.com>
24 lines
414 B
Rust
24 lines
414 B
Rust
#![feature(coverage_attribute)]
|
|
#![coverage(off)]
|
|
//@ edition: 2021
|
|
|
|
//@ aux-build: executor.rs
|
|
extern crate executor;
|
|
|
|
async fn ready() -> u8 {
|
|
1
|
|
}
|
|
|
|
#[coverage(on)]
|
|
#[rustfmt::skip]
|
|
async fn await_ready() -> u8 {
|
|
// await should be covered even if the function never yields
|
|
ready()
|
|
.await
|
|
}
|
|
|
|
fn main() {
|
|
let mut future = Box::pin(await_ready());
|
|
executor::block_on(future.as_mut());
|
|
}
|