Skip to content

target_feature_11 rejects code that was previously accepted #108655

Closed

Description

#[target_feature(enable = "sse2")]
pub unsafe fn test() {
    ({
        #[inline(always)]
        move || {}
    })();
}

The preceding code used to compile successfully. Since the stabilization of
#![feature(target_feature_11)] in #99767 the compilation fails with:

error: cannot use `#[inline(always)]` with `#[target_feature]`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    A-target-featureArea: Enabling/disabling target features like AVX, Neon, etc.C-bugCategory: This is a bug.F-target_feature_11target feature 1.1 RFCP-lowLow priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.requires-nightlyThis issue requires a nightly compiler in some way.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions