2023-12-15 05:38:27 +00:00
|
|
|
#![feature(coverage_attribute)]
|
|
|
|
#![feature(noop_waker)]
|
|
|
|
//@ edition: 2018
|
2021-04-18 22:04:59 +00:00
|
|
|
|
2024-09-06 05:41:10 +00:00
|
|
|
//@ aux-build: executor.rs
|
|
|
|
extern crate executor;
|
|
|
|
|
2021-04-18 22:04:59 +00:00
|
|
|
fn non_async_func() {
|
|
|
|
println!("non_async_func was covered");
|
|
|
|
let b = true;
|
|
|
|
if b {
|
|
|
|
println!("non_async_func println in block");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
async fn async_func() {
|
|
|
|
println!("async_func was covered");
|
|
|
|
let b = true;
|
|
|
|
if b {
|
|
|
|
println!("async_func println in block");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
async fn async_func_just_println() {
|
|
|
|
println!("async_func_just_println was covered");
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
println!("codecovsample::main");
|
|
|
|
|
|
|
|
non_async_func();
|
|
|
|
|
|
|
|
executor::block_on(async_func());
|
|
|
|
executor::block_on(async_func_just_println());
|
|
|
|
}
|