Coverage behavioral changes on #[derive] lines
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.1k
- PR merge metrics
- PR metrics pending
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the example from the issue using the shown Cargo.toml and cargo llvm-cov across Rust 1.83, stable versions, beta, and nightly. Compare how the #[derive(Asn1Read)] lines are reported, then check the compiler coverage behavior and existing coverage tests to determine whether the beta/nightly result is expected and stable.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers, testing
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100