Skip to content

Commit 2dd7ab4

Browse files
committed
Provide a module for direct inclusion by libstd
1 parent 85ec6ca commit 2dd7ab4

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

crates/std_detect/Cargo.toml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,8 @@ is-it-maintained-open-issues = { repository = "rust-lang-nursery/stdsimd" }
2323
maintenance = { status = "experimental" }
2424

2525
[dependencies]
26-
libc = "0.2"
26+
libc = { version = "0.2", default-features = false }
2727
cfg-if = { version = "^0.1.6", default-features = false }
28-
rustc-std-workspace-core = { version = "1.0.0", optional = true }
29-
30-
[features]
31-
default = []
32-
rustc-dep-of-std = [ 'libc/rustc-dep-of-std', 'rustc-std-workspace-core' ]
3328

3429
[dev-dependencies]
3530
core_arch = { version = "0.1.3", path = "../core_arch" }

crates/std_detect/src/detect/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ cfg_if! {
6868
// On x86/x86_64 no OS specific functionality is required.
6969
#[path = "os/x86.rs"]
7070
mod os;
71-
} else if #[cfg(target_os = "linux")] {
71+
} else if #[cfg(all(target_os = "linux", feature = "use_std"))] {
7272
#[path = "os/linux/mod.rs"]
7373
mod os;
7474
} else if #[cfg(target_os = "freebsd")] {

crates/std_detect/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
//! * `powerpc`: [`is_powerpc_feature_detected`]
1212
//! * `powerpc64`: [`is_powerpc64_feature_detected`]
1313
14+
#![unstable(feature = "stdsimd", issue = "27731")]
1415
#![feature(const_fn, integer_atomics, staged_api, stdsimd)]
1516
#![feature(doc_cfg, allow_internal_unstable)]
1617
#![cfg_attr(feature = "cargo-clippy", allow(clippy::shadow_reuse))]
@@ -21,7 +22,6 @@
2122
#![cfg_attr(target_os = "linux", feature(linkage))]
2223
#![cfg_attr(all(target_os = "freebsd", target_arch = "aarch64"), feature(asm))]
2324
#![no_std]
24-
#![unstable(feature = "stdsimd", issue = "27731")]
2525

2626
#[cfg(test)]
2727
#[macro_use(println)]

crates/std_detect/src/mod.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
//! `std_detect`
2+
3+
#[doc(hidden)] // unstable implementation detail
4+
#[unstable(feature = "stdsimd", issue = "27731")]
5+
pub mod detect;

0 commit comments

Comments
 (0)