diff options
| author | Jethro Beekman <jethro@fortanix.com> | 2018-12-19 11:53:40 +0530 |
|---|---|---|
| committer | Jethro Beekman <jethro@fortanix.com> | 2018-12-19 11:53:40 +0530 |
| commit | f72f28fae217b1329c533be8df00870bb226865d (patch) | |
| tree | 2f9110b6ca2138d674bc1b6f2dae123051233e22 /src/libstd | |
| parent | d99a320cba42f661aebfa1293b7b2ec3603dda75 (diff) | |
| download | rust-f72f28fae217b1329c533be8df00870bb226865d.tar.gz rust-f72f28fae217b1329c533be8df00870bb226865d.zip | |
Show platform-specific modules in `std::os` when building those platforms
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/os/mod.rs | 33 |
1 files changed, 16 insertions, 17 deletions
diff --git a/src/libstd/os/mod.rs b/src/libstd/os/mod.rs index 1cb9799ff3c..0ab8fa424e3 100644 --- a/src/libstd/os/mod.rs +++ b/src/libstd/os/mod.rs @@ -29,25 +29,10 @@ cfg_if! { #[doc(cfg(target_os = "linux"))] pub mod linux; - } else { - // If we're not documenting libstd then we just expose everything as we - // otherwise would. - - #[cfg(target_os = "android")] pub mod android; - #[cfg(target_os = "bitrig")] pub mod bitrig; - #[cfg(target_os = "dragonfly")] pub mod dragonfly; - #[cfg(target_os = "freebsd")] pub mod freebsd; - #[cfg(target_os = "haiku")] pub mod haiku; - #[cfg(target_os = "ios")] pub mod ios; - #[cfg(target_os = "macos")] pub mod macos; - #[cfg(target_os = "netbsd")] pub mod netbsd; - #[cfg(target_os = "openbsd")] pub mod openbsd; - #[cfg(target_os = "solaris")] pub mod solaris; - #[cfg(target_os = "emscripten")] pub mod emscripten; - #[cfg(target_os = "fuchsia")] pub mod fuchsia; - #[cfg(target_os = "hermit")] pub mod hermit; + // If we're not documenting libstd then we just expose the main modules + // as we otherwise would. #[cfg(any(target_os = "redox", unix))] #[stable(feature = "rust1", since = "1.0.0")] @@ -63,4 +48,18 @@ cfg_if! { } } +#[cfg(target_os = "android")] pub mod android; +#[cfg(target_os = "bitrig")] pub mod bitrig; +#[cfg(target_os = "dragonfly")] pub mod dragonfly; +#[cfg(target_os = "freebsd")] pub mod freebsd; +#[cfg(target_os = "haiku")] pub mod haiku; +#[cfg(target_os = "ios")] pub mod ios; +#[cfg(target_os = "macos")] pub mod macos; +#[cfg(target_os = "netbsd")] pub mod netbsd; +#[cfg(target_os = "openbsd")] pub mod openbsd; +#[cfg(target_os = "solaris")] pub mod solaris; +#[cfg(target_os = "emscripten")] pub mod emscripten; +#[cfg(target_os = "fuchsia")] pub mod fuchsia; +#[cfg(target_os = "hermit")] pub mod hermit; + pub mod raw; |
