Closed
Description
I tried this code:
#[derive(PartialEq, Debug)]
pub enum EnumCov{
First,
Second,
Third,
Fourth
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn test_cov() {
let one = EnumCov::First;
let two = EnumCov::Second;
let three = EnumCov::Third;
let four = EnumCov::Fourth;
assert_eq!(one, EnumCov::First);
assert_eq!(two, EnumCov::Second);
assert_eq!(three, EnumCov::Third);
assert_eq!(four, EnumCov::Fourth);
}
}
Running these commands to get the code coverage report
cargo llvm-cov --html
Same issue with RUSTFLAGS="-C instrument-coverage" cargo test --tests
merge/report/show
I expected to see this happen: coverage 100%
Instead, this happened: Debug is shown as missed region
It's quite the same as #83601
Meta
rustc --version --verbose
:
rustc 1.65.0 (897e37553 2022-11-02)
binary: rustc
commit-hash: 897e37553bba8b42751c67658967889d11ecd120
commit-date: 2022-11-02
host: x86_64-unknown-linux-gnu
release: 1.65.0
LLVM version: 15.0.0
Backtrace not applicable.
Thanks!