- Notifications
You must be signed in to change notification settings - Fork 13.9k
Open
Labels
A-code-coverageArea: Source-based code coverage (-Cinstrument-coverage)Area: Source-based code coverage (-Cinstrument-coverage)C-bugCategory: This is a bug.Category: This is a bug.I-prioritizeIssue: Indicates that prioritization has been requested for this issue.Issue: Indicates that prioritization has been requested for this issue.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-stablePerformance or correctness regression from one stable version to another.Performance or correctness regression from one stable version to another.
Description
We are seeing changes in coverage behavior in 1.83, 1.84-1.90, and beta/nightly. This code:
use asn1::Asn1Read; #[derive(Asn1Read)] struct ThreeIntegers { first: u64, second: u64, third: u64, } #[cfg(test)] mod tests { use super::*; #[test] fn test_parse_and_serialize() { // This represents SEQUENCE { INTEGER 1, INTEGER 2, INTEGER 3 } let der_data = b"\x30\x09\x02\x01\x01\x02\x01\x02\x02\x01\x03"; // Parse the DER data let parsed: ThreeIntegers = asn1::parse_single(der_data) .expect("Failed to parse DER data"); assert_eq!(parsed.first, 1); assert_eq!(parsed.second, 2); assert_eq!(parsed.third, 3); } }
with this Cargo.toml
[package] name = "rust-asn1-project" version = "0.1.0" edition = "2021" [dependencies] asn1 = "0.22.0"
has coverage in 1.83.0 when run with cargo llvm-cov --html
(which of course requires llvm-tools-preview
).

But in 1.84-1.90 it shows as uncovered.
And in beta and nightly this now doesn't show as a line at all:

Since this has changed multiple times now (covered -> uncovered -> not a line at all) I'm filing this issue to verify that the beta/nightly behavior is expected and won't change again in the future.
alex
Metadata
Metadata
Assignees
Labels
A-code-coverageArea: Source-based code coverage (-Cinstrument-coverage)Area: Source-based code coverage (-Cinstrument-coverage)C-bugCategory: This is a bug.Category: This is a bug.I-prioritizeIssue: Indicates that prioritization has been requested for this issue.Issue: Indicates that prioritization has been requested for this issue.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-stablePerformance or correctness regression from one stable version to another.Performance or correctness regression from one stable version to another.