lib.rs - source
Description: Source of the Rust file `library/std_detect/src/lib.rs`.

#
std_detect/
lib.rs

    1//! Run-time feature detection for the Rust standard library.
    2//!
    3//! To detect whether a feature is enabled in the system running the binary
    4//! use one of the appropriate macro for the target:
    5//!
    6//! * `x86` and `x86_64`: [`is_x86_feature_detected`]
    7//! * `arm`: [`is_arm_feature_detected`]
    8//! * `aarch64`: [`is_aarch64_feature_detected`]
    9//! * `riscv`: [`is_riscv_feature_detected`]
    10//! * `mips`: [`is_mips_feature_detected`]
    11//! * `mips64`: [`is_mips64_feature_detected`]
    12//! * `powerpc`: [`is_powerpc_feature_detected`]
    13//! * `powerpc64`: [`is_powerpc64_feature_detected`]
    14//! * `loongarch`: [`is_loongarch_feature_detected`]
    15//! * `s390x`: [`is_s390x_feature_detected`]
    16
    17#![unstable(feature = "stdarch_internal", issue = "none")]
    18#![feature(staged_api, cfg_select, doc_cfg, allow_internal_unstable)]
    19#![deny(rust_2018_idioms)]
    20#![allow(clippy::shadow_reuse)]
    21#![cfg_attr(test, allow(unused_imports))]
    22#![no_std]
    23#![allow(internal_features)]
    24
    25#[cfg(test)]
    26#[macro_use]
    27extern crate std;
    28
    29// rust-lang/rust#83888: removing `extern crate` gives an error that `vec_spare>
    30#[allow(unused_extern_crates)]
    31extern crate alloc;
    32
    33#[doc(hidden)]
    34#[unstable(feature = "stdarch_internal", issue = "none")]
    35pub mod detect;