2023-12-25 04:23:15 -06:00
|
|
|
#![feature(coverage_attribute)]
|
|
|
|
//@ edition: 2021
|
2024-03-10 05:20:27 -05:00
|
|
|
//@ compile-flags: -Zcoverage-options=branch
|
2023-12-25 04:23:15 -06:00
|
|
|
//@ llvm-cov-flags: --show-branches=count
|
|
|
|
|
|
|
|
fn print_size<T>() {
|
|
|
|
if std::mem::size_of::<T>() > 4 {
|
|
|
|
println!("size > 4");
|
|
|
|
} else {
|
|
|
|
println!("size <= 4");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#[coverage(off)]
|
|
|
|
fn main() {
|
|
|
|
print_size::<()>();
|
|
|
|
print_size::<u32>();
|
|
|
|
print_size::<u64>();
|
|
|
|
}
|