Skip to content

#[target_feature(enable = "avx2")] can be applied to non-functions, but doesn't do anything #54584

Closed
@nicokoch

Description

@nicokoch

Playground link demonstrating the problem

Playground link when it works

The compiler should tell me that the annotation will not do anything (in the first case)

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-attributesArea: Attributes (`#[…]`, `#![…]`)A-diagnosticsArea: Messages for errors, warnings, and lintsA-target-featureArea: Enabling/disabling target features like AVX, Neon, etc.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