Skip to content

no_coverage feature-gated on function, not crate? #84836

Closed
@Mark-Simulacrum

Description

@Mark-Simulacrum

It looks like the no_coverage attribute was added by checking for feature(no_coverage) on the function, but this isn't how feature gating usually works. Additionally, I don't believe that restricts usage of this on stable/beta, since nothing is actually checking this feature gate.

Noticed based on the test case (https://github.com/rust-lang/rust/blob/master/src/test/ui/feature-gates/feature-gate-no_coverage.rs) and while looking at the feature-gating code.

cc @tmandry @richkadel

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-code-coverageArea: Source-based code coverage (-Cinstrument-coverage)A-stabilityArea: `#[stable]`, `#[unstable]` etc.C-bugCategory: This is a bug.P-criticalCritical priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions