Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make is_{arch}_feature_detected! available for std #1081

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions crates/std_detect/src/detect/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ macro_rules! features {
};
}

#[cfg(not(test))]
pub use $macro_name;

/// Each variant denotes a position in a bitset for a particular feature.
///
/// PLEASE: do not use this, it is an implementation detail subject
Expand Down
16 changes: 8 additions & 8 deletions crates/std_detect/src/detect/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,35 +29,35 @@ cfg_if! {
if #[cfg(any(target_arch = "x86", target_arch = "x86_64"))] {
#[path = "arch/x86.rs"]
#[macro_use]
mod arch;
pub(crate) mod arch;
} else if #[cfg(target_arch = "arm")] {
#[path = "arch/arm.rs"]
#[macro_use]
mod arch;
pub(crate) mod arch;
} else if #[cfg(target_arch = "aarch64")] {
#[path = "arch/aarch64.rs"]
#[macro_use]
mod arch;
pub(crate) mod arch;
} else if #[cfg(target_arch = "powerpc")] {
#[path = "arch/powerpc.rs"]
#[macro_use]
mod arch;
pub(crate) mod arch;
} else if #[cfg(target_arch = "powerpc64")] {
#[path = "arch/powerpc64.rs"]
#[macro_use]
mod arch;
pub(crate) mod arch;
} else if #[cfg(target_arch = "mips")] {
#[path = "arch/mips.rs"]
#[macro_use]
mod arch;
pub(crate) mod arch;
} else if #[cfg(target_arch = "mips64")] {
#[path = "arch/mips64.rs"]
#[macro_use]
mod arch;
pub(crate) mod arch;
} else {
// Unimplemented architecture:
#[allow(dead_code)]
mod arch {
pub(crate) mod arch {
#[doc(hidden)]
pub(crate) enum Feature {
Null
Expand Down