diff options
| author | Amanieu d'Antras <amanieu@gmail.com> | 2024-01-04 14:35:45 +0000 |
|---|---|---|
| committer | Amanieu d'Antras <amanieu@gmail.com> | 2024-01-05 11:14:38 +0000 |
| commit | 76d52cdd6831a092739234cfc0d133ed072a02a4 (patch) | |
| tree | e84cabf157a2493177285669ae227528e6be3882 | |
| parent | fd973c2765a0de864e3b83bf6cd2af6dc3db025d (diff) | |
| download | rust-76d52cdd6831a092739234cfc0d133ed072a02a4.tar.gz rust-76d52cdd6831a092739234cfc0d133ed072a02a4.zip | |
Fix std_detect not being an unstable crate
More fallout from #1486
| -rw-r--r-- | library/stdarch/crates/core_arch/src/lib.rs | 2 | ||||
| -rw-r--r-- | library/stdarch/crates/std_detect/src/lib.rs | 6 | ||||
| -rw-r--r-- | library/stdarch/crates/std_detect/tests/macro_trailing_commas.rs | 12 | ||||
| -rw-r--r-- | library/stdarch/crates/std_detect/tests/x86-specific.rs | 2 | ||||
| -rw-r--r-- | library/stdarch/examples/connect5.rs | 5 | ||||
| -rw-r--r-- | library/stdarch/examples/hex.rs | 5 |
6 files changed, 26 insertions, 6 deletions
diff --git a/library/stdarch/crates/core_arch/src/lib.rs b/library/stdarch/crates/core_arch/src/lib.rs index bd4de67445a..5dcd11fb68c 100644 --- a/library/stdarch/crates/core_arch/src/lib.rs +++ b/library/stdarch/crates/core_arch/src/lib.rs @@ -35,7 +35,7 @@ inline_const, generic_arg_infer )] -#![cfg_attr(test, feature(test, abi_vectorcall))] +#![cfg_attr(test, feature(test, abi_vectorcall, stdarch_internal))] #![deny(clippy::missing_inline_in_public_items)] #![allow( clippy::identity_op, diff --git a/library/stdarch/crates/std_detect/src/lib.rs b/library/stdarch/crates/std_detect/src/lib.rs index 40c1aa4667d..19cc021712e 100644 --- a/library/stdarch/crates/std_detect/src/lib.rs +++ b/library/stdarch/crates/std_detect/src/lib.rs @@ -13,7 +13,7 @@ //! * `powerpc64`: [`is_powerpc64_feature_detected`] //! * `loongarch`: [`is_loongarch_feature_detected`] -#![stable(feature = "stdsimd", since = "1.27.0")] +#![unstable(feature = "stdarch_internal", issue = "none")] #![feature(staged_api, doc_cfg, allow_internal_unstable)] #![deny(rust_2018_idioms)] #![allow(clippy::shadow_reuse)] @@ -23,7 +23,7 @@ // 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_attr(not(feature = "rustc-dep-of-std"), feature(stdsimd))] #![cfg_attr( all( any(target_arch = "x86", target_arch = "x86_64"), @@ -42,5 +42,5 @@ extern crate std; extern crate alloc; #[doc(hidden)] -#[stable(feature = "stdsimd", since = "1.27.0")] +#[unstable(feature = "stdarch_internal", issue = "none")] pub mod detect; 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 8304b225f53..d37629ec0a4 100644 --- a/library/stdarch/crates/std_detect/tests/macro_trailing_commas.rs +++ b/library/stdarch/crates/std_detect/tests/macro_trailing_commas.rs @@ -1,3 +1,15 @@ +#![allow(internal_features)] +#![cfg_attr( + any( + target_arch = "arm", + target_arch = "aarch64", + target_arch = "x86", + target_arch = "x86_64", + target_arch = "powerpc", + target_arch = "powerpc64" + ), + 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))] diff --git a/library/stdarch/crates/std_detect/tests/x86-specific.rs b/library/stdarch/crates/std_detect/tests/x86-specific.rs index 54bcab7b1ec..1d8d8ba2ecc 100644 --- a/library/stdarch/crates/std_detect/tests/x86-specific.rs +++ b/library/stdarch/crates/std_detect/tests/x86-specific.rs @@ -1,4 +1,6 @@ #![cfg(any(target_arch = "x86", target_arch = "x86_64"))] +#![allow(internal_features)] +#![feature(stdarch_internal)] extern crate cupid; #[macro_use] diff --git a/library/stdarch/examples/connect5.rs b/library/stdarch/examples/connect5.rs index 53e9b8124de..a569689fad3 100644 --- a/library/stdarch/examples/connect5.rs +++ b/library/stdarch/examples/connect5.rs @@ -28,9 +28,10 @@ //! You should see a game self-playing. In the end of the game, it shows the average time for //! each move. +#![allow(internal_features)] #![feature(avx512_target_feature)] -#![cfg_attr(target_arch = "x86", feature(stdarch_x86_avx512))] -#![cfg_attr(target_arch = "x86_64", feature(stdarch_x86_avx512))] +#![cfg_attr(target_arch = "x86", feature(stdarch_x86_avx512, stdarch_internal))] +#![cfg_attr(target_arch = "x86_64", feature(stdarch_x86_avx512, stdarch_internal))] #![feature(stmt_expr_attributes)] use rand::seq::SliceRandom; diff --git a/library/stdarch/examples/hex.rs b/library/stdarch/examples/hex.rs index 490556e8bf7..b73a306f5fe 100644 --- a/library/stdarch/examples/hex.rs +++ b/library/stdarch/examples/hex.rs @@ -12,8 +12,13 @@ //! //! and you should see `746573740a` get printed out. +#![allow(internal_features)] #![feature(wasm_target_feature)] #![cfg_attr(test, feature(test))] +#![cfg_attr( + any(target_arch = "x86", target_arch = "x86_64"), + feature(stdarch_internal) +)] #