mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-09 05:23:07 +00:00
87c2f9a5be
This reverts commit1d35638dc3
, reversing changes made tof23a80a4c2
.
35 lines
667 B
Rust
35 lines
667 B
Rust
#![feature(coverage_attribute)]
|
|
//@ edition: 2018
|
|
|
|
//@ aux-build: executor.rs
|
|
extern crate executor;
|
|
|
|
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());
|
|
}
|