diff options
| author | Amanieu d'Antras <amanieu@gmail.com> | 2023-10-27 13:37:04 +0100 |
|---|---|---|
| committer | Amanieu d'Antras <amanieu@gmail.com> | 2023-10-29 20:39:50 +0100 |
| commit | ea27e5cfcb0bf156e11d45fd439ccbf539cd1d18 (patch) | |
| tree | 2f5dea2aea729cb8f0973698d0ca6fce7483f620 /library/stdarch/crates/std_detect | |
| parent | 3e5850284a518dff59f691e50fe0d7efded9ff56 (diff) | |
| download | rust-ea27e5cfcb0bf156e11d45fd439ccbf539cd1d18.tar.gz rust-ea27e5cfcb0bf156e11d45fd439ccbf539cd1d18.zip | |
Fix various compilation errors
Diffstat (limited to 'library/stdarch/crates/std_detect')
3 files changed, 20 insertions, 15 deletions
diff --git a/library/stdarch/crates/std_detect/src/lib.rs b/library/stdarch/crates/std_detect/src/lib.rs index 1ff42000992..5862ada21db 100644 --- a/library/stdarch/crates/std_detect/src/lib.rs +++ b/library/stdarch/crates/std_detect/src/lib.rs @@ -21,6 +21,8 @@ #![no_std] #![allow(internal_features)] // Temporary hack: needed to build against toolchains from before the mass feature renaming. +// Remove this as soon as the stdarch submodule is updated on nightly. +#![allow(stable_features)] #![feature(stdsimd)] #[cfg(test)] diff --git a/library/stdarch/crates/std_detect/tests/cpu-detection.rs b/library/stdarch/crates/std_detect/tests/cpu-detection.rs index f20ea6a2f77..8d551fc2cb7 100644 --- a/library/stdarch/crates/std_detect/tests/cpu-detection.rs +++ b/library/stdarch/crates/std_detect/tests/cpu-detection.rs @@ -1,19 +1,20 @@ -#![feature( - stdarch_internal, - stdarch_arm_feature_detection, - stdarch_powerpc_feature_detection -)] +#![feature(stdarch_internal)] +#![cfg_attr(target_arch = "arm", feature(stdarch_arm_feature_detection))] +#![cfg_attr(target_arch = "powerpc", feature(stdarch_powerpc_feature_detection))] +#![cfg_attr(target_arch = "powerpc64", feature(stdarch_powerpc_feature_detection))] #![allow(clippy::unwrap_used, clippy::use_debug, clippy::print_stdout)] -#![cfg(any( - target_arch = "arm", - target_arch = "aarch64", - target_arch = "x86", - target_arch = "x86_64", - target_arch = "powerpc", - target_arch = "powerpc64" -))] -#[macro_use] +#[cfg_attr( + any( + target_arch = "arm", + target_arch = "aarch64", + target_arch = "x86", + target_arch = "x86_64", + target_arch = "powerpc", + target_arch = "powerpc64" + ), + macro_use +)] extern crate std_detect; #[test] 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 3d5c736a053..8304b225f53 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,6 @@ -#![feature(stdarch_arm_feature_detection, stdarch_powerpc_feature_detection)] +#![cfg_attr(target_arch = "arm", feature(stdarch_arm_feature_detection))] +#![cfg_attr(target_arch = "powerpc", feature(stdarch_powerpc_feature_detection))] +#![cfg_attr(target_arch = "powerpc64", feature(stdarch_powerpc_feature_detection))] #![allow(clippy::unwrap_used, clippy::use_debug, clippy::print_stdout)] #[cfg(any( |
