Skip to content

Commit 0bb02ee

Browse files
committed
Fix std_detect not being an unstable crate
More fallout from rust-lang#1486
1 parent 10b0fcd commit 0bb02ee

File tree

5 files changed

+21
-6
lines changed

5 files changed

+21
-6
lines changed

crates/core_arch/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
inline_const,
3636
generic_arg_infer
3737
)]
38-
#![cfg_attr(test, feature(test, abi_vectorcall))]
38+
#![cfg_attr(test, feature(test, abi_vectorcall, stdarch_internal))]
3939
#![deny(clippy::missing_inline_in_public_items)]
4040
#![allow(
4141
clippy::identity_op,

crates/std_detect/src/lib.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
//! * `powerpc64`: [`is_powerpc64_feature_detected`]
1414
//! * `loongarch`: [`is_loongarch_feature_detected`]
1515
16-
#![stable(feature = "stdsimd", since = "1.27.0")]
16+
#![unstable(feature = "stdarch_internal", issue = "none")]
1717
#![feature(staged_api, doc_cfg, allow_internal_unstable)]
1818
#![deny(rust_2018_idioms)]
1919
#![allow(clippy::shadow_reuse)]
@@ -23,7 +23,7 @@
2323
// Temporary hack: needed to build against toolchains from before the mass feature renaming.
2424
// Remove this as soon as the stdarch submodule is updated on nightly.
2525
#![allow(stable_features)]
26-
#![feature(stdsimd)]
26+
#![cfg_attr(not(feature = "rustc-dep-of-std"), feature(stdsimd))]
2727
#![cfg_attr(
2828
all(
2929
any(target_arch = "x86", target_arch = "x86_64"),
@@ -42,5 +42,5 @@ extern crate std;
4242
extern crate alloc;
4343

4444
#[doc(hidden)]
45-
#[stable(feature = "stdsimd", since = "1.27.0")]
45+
#[unstable(feature = "stdarch_internal", issue = "none")]
4646
pub mod detect;

crates/std_detect/tests/macro_trailing_commas.rs

+12
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
#![allow(internal_features)]
2+
#![cfg_attr(
3+
any(
4+
target_arch = "arm",
5+
target_arch = "aarch64",
6+
target_arch = "x86",
7+
target_arch = "x86_64",
8+
target_arch = "powerpc",
9+
target_arch = "powerpc64"
10+
),
11+
feature(stdarch_internal)
12+
)]
113
#![cfg_attr(target_arch = "arm", feature(stdarch_arm_feature_detection))]
214
#![cfg_attr(target_arch = "powerpc", feature(stdarch_powerpc_feature_detection))]
315
#![cfg_attr(target_arch = "powerpc64", feature(stdarch_powerpc_feature_detection))]

crates/std_detect/tests/x86-specific.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
#![cfg(any(target_arch = "x86", target_arch = "x86_64"))]
2+
#![allow(internal_features)]
3+
#![feature(stdarch_internal)]
24

35
extern crate cupid;
46
#[macro_use]

examples/connect5.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,10 @@
2828
//! You should see a game self-playing. In the end of the game, it shows the average time for
2929
//! each move.
3030
31+
#![allow(internal_features)]
3132
#![feature(avx512_target_feature)]
32-
#![cfg_attr(target_arch = "x86", feature(stdarch_x86_avx512))]
33-
#![cfg_attr(target_arch = "x86_64", feature(stdarch_x86_avx512))]
33+
#![cfg_attr(target_arch = "x86", feature(stdarch_x86_avx512, stdarch_internal))]
34+
#![cfg_attr(target_arch = "x86_64", feature(stdarch_x86_avx512, stdarch_internal))]
3435
#![feature(stmt_expr_attributes)]
3536

3637
use rand::seq::SliceRandom;

0 commit comments

Comments
 (0)