Skip to content

#[coverage(..)] attribute should apply recursively to nested functions/methods/closures #126625

Closed
@Zalathar

Description

@Zalathar

As discussed at the main tracking issue, #84605 (comment), there is a desire for #[coverage(off)] (and #[coverage(on)]) to apply recursively to all functions/methods/closures inside the one being annotated.

The current behaviour is that the attribute only affects the function that it is directly attached to.

@rustbot label +A-code-coverage

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-code-coverageArea: Source-based code coverage (-Cinstrument-coverage)C-enhancementCategory: An issue proposing an enhancement or a PR with one.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions