1 //! Run-time feature detection for the Rust standard library.
3 //! To detect whether a feature is enabled in the system running the binary
4 //! use one of the appropriate macro for the target:
6 //! * `x86` and `x86_64`: [`is_x86_feature_detected`]
7 //! * `arm`: [`is_arm_feature_detected`]
8 //! * `aarch64`: [`is_aarch64_feature_detected`]
9 //! * `mips`: [`is_mips_feature_detected`]
10 //! * `mips64`: [`is_mips64_feature_detected`]
11 //! * `powerpc`: [`is_powerpc_feature_detected`]
12 //! * `powerpc64`: [`is_powerpc64_feature_detected`]
14 #![unstable(feature = "stdsimd", issue = "27731")]
15 #![feature(const_fn, staged_api, stdsimd, doc_cfg, allow_internal_unstable)]
16 #![cfg_attr(feature = "cargo-clippy", allow(clippy::shadow_reuse))]
18 feature
= "cargo-clippy",
19 deny(clippy
::missing_inline_in_public_items
,)
21 #![cfg_attr(target_os = "linux", feature(linkage))]
22 #![cfg_attr(all(target_os = "freebsd", target_arch = "aarch64"), feature(asm))]
23 #![cfg_attr(stdsimd_strict, deny(warnings))]
24 #![cfg_attr(test, allow(unused_imports))]
31 if #[cfg(feature = "std_detect_file_io")] {
32 #[cfg_attr(test, macro_use(println))]
35 #[allow(unused_imports)]
36 use std
::{arch, fs, io, mem, sync}
;
42 #[allow(unused_imports)]
43 use core
::{arch, mem, sync}
;
47 #[cfg(feature = "std_detect_dlsym_getauxval")]
51 #[unstable(feature = "stdsimd", issue = "27731")]