Skip to content

Commit

Permalink
Fix std_detect not being an unstable crate
Browse files Browse the repository at this point in the history
More fallout from rust-lang#1486
  • Loading branch information
Amanieu committed Jan 4, 2024
1 parent 10b0fcd commit 54d0be0
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 6 deletions.
2 changes: 1 addition & 1 deletion crates/core_arch/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
6 changes: 3 additions & 3 deletions crates/std_detect/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand All @@ -22,7 +22,7 @@
#![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)]
#![allow(stable_features, unused_features)]
#![feature(stdsimd)]
#![cfg_attr(
all(
Expand All @@ -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;
12 changes: 12 additions & 0 deletions crates/std_detect/tests/macro_trailing_commas.rs
Original file line number Diff line number Diff line change
@@ -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))]
Expand Down
2 changes: 2 additions & 0 deletions crates/std_detect/tests/x86-specific.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#![cfg(any(target_arch = "x86", target_arch = "x86_64"))]
#![allow(internal_features)]
#![feature(stdarch_internal)]

extern crate cupid;
#[macro_use]
Expand Down
4 changes: 2 additions & 2 deletions examples/connect5.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
//! each move.

#![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;
Expand Down

0 comments on commit 54d0be0

Please sign in to comment.