Nested functions with #[no_coverage]
lead to non-obvious results.
#93319
Labels
A-code-coverage
Area: Source-based code coverage (-Cinstrument-coverage)
C-bug
Category: This is a bug.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
The fact that coverage is based on source ranges of function bodies means that an inner functions ranges are being "shadowed" by the outer function. When rendered, the source ranges appear to be covered (by the outer function) even though they are not.
An example from #92695:
Pretty printing the coverage report looks like this:
The text was updated successfully, but these errors were encountered: