Fix std build failure on non-x86 architectures

This is more fallout from #1486
This commit is contained in:
Amanieu d'Antras
2024-01-04 11:25:38 +00:00
parent a600c72f50
commit fd973c2765

View File

@@ -24,7 +24,13 @@
// Remove this as soon as the stdarch submodule is updated on nightly.
#![allow(stable_features)]
#![feature(stdsimd)]
#![cfg_attr(feature = "rustc-dep-of-std", feature(stdarch_x86_has_cpuid))]
#![cfg_attr(
all(
any(target_arch = "x86", target_arch = "x86_64"),
feature = "rustc-dep-of-std"
),
feature(stdarch_x86_has_cpuid)
)]
#[cfg(test)]
#[macro_use]