diff options
| author | Amanieu d'Antras <amanieu@gmail.com> | 2023-10-26 18:11:28 +0100 |
|---|---|---|
| committer | Amanieu d'Antras <amanieu@gmail.com> | 2023-10-29 20:39:50 +0100 |
| commit | b8ba57f310aaf3e5a02637f31735e93cb221c907 (patch) | |
| tree | af695152835d3f376d8a8ad4503db7cd9f2c3628 /library/stdarch/crates/std_detect | |
| parent | 941d609570675ecf4ab8566871d0d005e76c650d (diff) | |
| download | rust-b8ba57f310aaf3e5a02637f31735e93cb221c907.tar.gz rust-b8ba57f310aaf3e5a02637f31735e93cb221c907.zip | |
Cleanup last uses of the stdsimd feature
Diffstat (limited to 'library/stdarch/crates/std_detect')
6 files changed, 6 insertions, 5 deletions
diff --git a/library/stdarch/crates/std_detect/README.md b/library/stdarch/crates/std_detect/README.md index 5211771047f..3611daaf40f 100644 --- a/library/stdarch/crates/std_detect/README.md +++ b/library/stdarch/crates/std_detect/README.md @@ -9,7 +9,7 @@ supports certain features, like SIMD instructions. `std::detect` APIs are available as part of `libstd`. Prefer using it via the standard library than through this crate. Unstable features of `std::detect` are -available on nightly Rust behind the `feature(stdsimd)` feature-gate. +available on nightly Rust behind various feature-gates. If you need run-time feature detection in `#[no_std]` environments, Rust `core` library cannot help you. By design, Rust `core` is platform independent, but diff --git a/library/stdarch/crates/std_detect/src/detect/macros.rs b/library/stdarch/crates/std_detect/src/detect/macros.rs index d1bc990dd2c..5321ef2252e 100644 --- a/library/stdarch/crates/std_detect/src/detect/macros.rs +++ b/library/stdarch/crates/std_detect/src/detect/macros.rs @@ -26,7 +26,7 @@ macro_rules! features { ) => { #[macro_export] $(#[$macro_attrs])* - #[allow_internal_unstable(stdarch_internal, stdsimd)] + #[allow_internal_unstable(stdarch_internal)] #[cfg($cfg)] #[doc(cfg($cfg))] macro_rules! $macro_name { diff --git a/library/stdarch/crates/std_detect/src/lib.rs b/library/stdarch/crates/std_detect/src/lib.rs index 14359686f3c..1ff42000992 100644 --- a/library/stdarch/crates/std_detect/src/lib.rs +++ b/library/stdarch/crates/std_detect/src/lib.rs @@ -20,6 +20,8 @@ #![cfg_attr(test, allow(unused_imports))] #![no_std] #![allow(internal_features)] +// Temporary hack: needed to build against toolchains from before the mass feature renaming. +#![feature(stdsimd)] #[cfg(test)] #[macro_use] diff --git a/library/stdarch/crates/std_detect/tests/cpu-detection.rs b/library/stdarch/crates/std_detect/tests/cpu-detection.rs index f93212d24f6..01a9040da84 100644 --- a/library/stdarch/crates/std_detect/tests/cpu-detection.rs +++ b/library/stdarch/crates/std_detect/tests/cpu-detection.rs @@ -1,4 +1,4 @@ -#![feature(stdsimd)] +#![feature(stdarch_internal, stdarch_arm_feature_detection)] #![allow(clippy::unwrap_used, clippy::use_debug, clippy::print_stdout)] #![cfg(any( target_arch = "arm", diff --git a/library/stdarch/crates/std_detect/tests/macro_trailing_commas.rs b/library/stdarch/crates/std_detect/tests/macro_trailing_commas.rs index cd597af73cb..3a5d062f82b 100644 --- a/library/stdarch/crates/std_detect/tests/macro_trailing_commas.rs +++ b/library/stdarch/crates/std_detect/tests/macro_trailing_commas.rs @@ -1,4 +1,4 @@ -#![feature(stdsimd)] +#![feature(stdarch_arm_feature_detection)] #![allow(clippy::unwrap_used, clippy::use_debug, clippy::print_stdout)] #[cfg(any( diff --git a/library/stdarch/crates/std_detect/tests/x86-specific.rs b/library/stdarch/crates/std_detect/tests/x86-specific.rs index 38512c758d4..54bcab7b1ec 100644 --- a/library/stdarch/crates/std_detect/tests/x86-specific.rs +++ b/library/stdarch/crates/std_detect/tests/x86-specific.rs @@ -1,4 +1,3 @@ -#![feature(stdsimd)] #![cfg(any(target_arch = "x86", target_arch = "x86_64"))] extern crate cupid; |
