diff options
| author | gnzlbg <gonzalobg88@gmail.com> | 2019-09-18 09:08:59 +0200 |
|---|---|---|
| committer | gnzlbg <gnzlbg@users.noreply.github.com> | 2019-09-18 12:09:07 +0200 |
| commit | 88fe414dd38bd1e2c02937fc9d0b55900e1c8015 (patch) | |
| tree | 618e935e2d19f37e32ef17507ed3333590ae050e /library/stdarch/crates/std_detect/src/detect/mod.rs | |
| parent | 5bec3383c9011f51ceadaf68bb109a30f4f8d83d (diff) | |
| download | rust-88fe414dd38bd1e2c02937fc9d0b55900e1c8015.tar.gz rust-88fe414dd38bd1e2c02937fc9d0b55900e1c8015.zip | |
These items do not need to be public
Diffstat (limited to 'library/stdarch/crates/std_detect/src/detect/mod.rs')
| -rw-r--r-- | library/stdarch/crates/std_detect/src/detect/mod.rs | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/library/stdarch/crates/std_detect/src/detect/mod.rs b/library/stdarch/crates/std_detect/src/detect/mod.rs index 13397638498..78b37019154 100644 --- a/library/stdarch/crates/std_detect/src/detect/mod.rs +++ b/library/stdarch/crates/std_detect/src/detect/mod.rs @@ -56,7 +56,7 @@ cfg_if! { // Unimplemented architecture: mod arch { #[doc(hidden)] - pub enum Feature { + pub(crate) enum Feature { Null } #[doc(hidden)] @@ -64,14 +64,20 @@ cfg_if! { impl Feature { #[doc(hidden)] - pub fn from_str(_s: &str) -> Result<Feature, ()> { Err(()) } + pub(crate) fn from_str(_s: &str) -> Result<Feature, ()> { Err(()) } #[doc(hidden)] - pub fn to_str(self) -> &'static str { "" } + pub(crate) fn to_str(self) -> &'static str { "" } } } } } -pub use self::arch::{Feature, __is_feature_detected}; + +// This module needs to be public because the `is_{arch}_feature_detected!` +// macros expand calls to items within it in user crates. +#[doc(hidden)] +pub use self::arch::__is_feature_detected; + +pub(crate) use self::arch::Feature; mod bit; mod cache; @@ -106,7 +112,7 @@ cfg_if! { /// Performs run-time feature detection. #[inline] -pub fn check_for(x: Feature) -> bool { +fn check_for(x: Feature) -> bool { cache::test(x as u32, self::os::detect_features) } |
