-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
#[target_feature] is allowed on default implementations #108646
Copy link
Copy link
Closed
Labels
A-target-featureArea: Enabling/disabling target features like AVX, Neon, etc.Area: Enabling/disabling target features like AVX, Neon, etc.C-bugCategory: This is a bug.Category: This is a bug.F-target_feature_11target feature 1.1 RFCtarget feature 1.1 RFCT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.T-langRelevant to the language teamRelevant to the language teamrequires-nightlyThis issue requires a nightly compiler in some way. When possible, use a F-* label instead.This issue requires a nightly compiler in some way. When possible, use a F-* label instead.
Metadata
Metadata
Assignees
Labels
A-target-featureArea: Enabling/disabling target features like AVX, Neon, etc.Area: Enabling/disabling target features like AVX, Neon, etc.C-bugCategory: This is a bug.Category: This is a bug.F-target_feature_11target feature 1.1 RFCtarget feature 1.1 RFCT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.T-langRelevant to the language teamRelevant to the language teamrequires-nightlyThis issue requires a nightly compiler in some way. When possible, use a F-* label instead.This issue requires a nightly compiler in some way. When possible, use a F-* label instead.
Type
Fields
Give feedbackNo fields configured for issues without a type.
The compiler currently allows safe default method implementations to be marked with
#[target_feature]:which I don't think is allowed in RFC 2396. For reference,
#[target_feature]is not allowed on trait implementations:From my limited testing, this doesn't seem to be unsound however, as the compiler seems to consider all implementations of
Foo::fooas having#[target_feature(enable = "avx2")].cc #69098
@rustbot label T-lang T-compiler C-bug F-target_feature_11