-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Open
Labels
A-SIMDArea: SIMD (Single Instruction Multiple Data)Area: SIMD (Single Instruction Multiple Data)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.T-langRelevant to the language teamRelevant to the language team
Description
This should panic but it doesn`t
#[target_feature = "+avx"]
pub fn should_panic() {
#[cfg(target_feature = "avx")]
panic!("have_avx");
}
I would like for this to work because I have a macro that generates 2 copys of a function, one with #[target_feature = "+feat"]
and one without and I want to conditionally use some assembly when the feature is available.
CC #29717
Metadata
Metadata
Assignees
Labels
A-SIMDArea: SIMD (Single Instruction Multiple Data)Area: SIMD (Single Instruction Multiple Data)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.T-langRelevant to the language teamRelevant to the language team