Skip to content

Commit

Permalink
Cleanup last uses of the stdsimd feature
Browse files Browse the repository at this point in the history
  • Loading branch information
Amanieu committed Oct 26, 2023
1 parent 0708bdf commit ff24118
Show file tree
Hide file tree
Showing 11 changed files with 8 additions and 11 deletions.
2 changes: 0 additions & 2 deletions crates/core_arch/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ The `core::arch` module implements architecture-dependent intrinsics (e.g. SIMD)

`core::arch` is available as part of `libcore` and it is re-exported by
`libstd`. Prefer using it via `core::arch` or `std::arch` than via this crate.
Unstable features are often available in nightly Rust via the
`feature(stdsimd)`.

Using `core::arch` via this crate requires nightly Rust, and it can (and does)
break often. The only cases in which you should consider using it via this crate
Expand Down
1 change: 0 additions & 1 deletion crates/intrinsic-test/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,6 @@ fn generate_rust_program(notices: &str, intrinsic: &Intrinsic, a32: bool) -> Str
format!(
r#"{notices}#![feature(simd_ffi)]
#![feature(link_llvm_intrinsics)]
#![feature(stdsimd)]
#![allow(overflowing_literals)]
#![allow(non_upper_case_globals)]
use core_arch::arch::{target_arch}::*;
Expand Down
2 changes: 1 addition & 1 deletion crates/std_detect/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion crates/std_detect/src/detect/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 2 additions & 0 deletions crates/std_detect/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
2 changes: 1 addition & 1 deletion crates/std_detect/tests/cpu-detection.rs
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion crates/std_detect/tests/macro_trailing_commas.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![feature(stdsimd)]
#![feature(stdarch_arm_feature_detection)]
#![allow(clippy::unwrap_used, clippy::use_debug, clippy::print_stdout)]

#[cfg(any(
Expand Down
1 change: 0 additions & 1 deletion crates/std_detect/tests/x86-specific.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#![feature(stdsimd)]
#![cfg(any(target_arch = "x86", target_arch = "x86_64"))]

extern crate cupid;
Expand Down
2 changes: 1 addition & 1 deletion examples/connect5.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
//! You should see a game self-playing. In the end of the game, it shows the average time for
//! each move.

#![feature(stdsimd, avx512_target_feature)]
#![feature(avx512_target_feature, stdarch_x86_avx512)]
#![feature(stmt_expr_attributes)]

use rand::seq::SliceRandom;
Expand Down
2 changes: 1 addition & 1 deletion examples/hex.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
//!
//! and you should see `746573740a` get printed out.

#![feature(stdsimd, wasm_target_feature)]
#![feature(wasm_target_feature)]
#![cfg_attr(test, feature(test))]
#![allow(
clippy::unwrap_used,
Expand Down
1 change: 0 additions & 1 deletion examples/wasm.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
//! A simple slab allocator for pages in wasm

#![feature(stdsimd)]
#![cfg(target_arch = "wasm32")]

use std::ptr;
Expand Down

0 comments on commit ff24118

Please sign in to comment.