-
-
Notifications
You must be signed in to change notification settings - Fork 14.9k
Missing coverage on assert!(!...) statements #118904
Copy link
Copy link
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.
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.
Type
Fields
Give feedbackNo fields configured for issues without a type.
I tried this code:
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!falsetotrue, the source will be fully covered, it seems that I can’t getassert!to be covered as long as the argument starts with an!operator.Meta
rustc --version --verbose: