-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
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.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.
Description
I tried this code:
fn main() {
assert!(!false);
}
I expected to see this happen: Run this program with cargo-llvm-cov
: cargo llvm-cov run --html
, I expect the source code should be fully covered.
Instead, this happened: The assert!
part in the source code is not covered. But if I change !false
to true
, the source will be fully covered, it seems that I can’t get assert!
to be covered as long as the argument starts with an !
operator.
Meta
rustc --version --verbose
:
rustc 1.76.0-nightly (f967532a4 2023-12-08)
binary: rustc
commit-hash: f967532a47eb728ada44473a5c4c2eca1a45fe30
commit-date: 2023-12-08
host: x86_64-pc-windows-msvc
release: 1.76.0-nightly
LLVM version: 17.0.5
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.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.