Skip to content

Commit f72f28f

Browse files
author
Jethro Beekman
committed
Show platform-specific modules in std::os when building those platforms
1 parent d99a320 commit f72f28f

File tree

1 file changed

+16
-17
lines changed

1 file changed

+16
-17
lines changed

src/libstd/os/mod.rs

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -29,25 +29,10 @@ cfg_if! {
2929

3030
#[doc(cfg(target_os = "linux"))]
3131
pub mod linux;
32-
3332
} else {
3433

35-
// If we're not documenting libstd then we just expose everything as we
36-
// otherwise would.
37-
38-
#[cfg(target_os = "android")] pub mod android;
39-
#[cfg(target_os = "bitrig")] pub mod bitrig;
40-
#[cfg(target_os = "dragonfly")] pub mod dragonfly;
41-
#[cfg(target_os = "freebsd")] pub mod freebsd;
42-
#[cfg(target_os = "haiku")] pub mod haiku;
43-
#[cfg(target_os = "ios")] pub mod ios;
44-
#[cfg(target_os = "macos")] pub mod macos;
45-
#[cfg(target_os = "netbsd")] pub mod netbsd;
46-
#[cfg(target_os = "openbsd")] pub mod openbsd;
47-
#[cfg(target_os = "solaris")] pub mod solaris;
48-
#[cfg(target_os = "emscripten")] pub mod emscripten;
49-
#[cfg(target_os = "fuchsia")] pub mod fuchsia;
50-
#[cfg(target_os = "hermit")] pub mod hermit;
34+
// If we're not documenting libstd then we just expose the main modules
35+
// as we otherwise would.
5136

5237
#[cfg(any(target_os = "redox", unix))]
5338
#[stable(feature = "rust1", since = "1.0.0")]
@@ -63,4 +48,18 @@ cfg_if! {
6348
}
6449
}
6550

51+
#[cfg(target_os = "android")] pub mod android;
52+
#[cfg(target_os = "bitrig")] pub mod bitrig;
53+
#[cfg(target_os = "dragonfly")] pub mod dragonfly;
54+
#[cfg(target_os = "freebsd")] pub mod freebsd;
55+
#[cfg(target_os = "haiku")] pub mod haiku;
56+
#[cfg(target_os = "ios")] pub mod ios;
57+
#[cfg(target_os = "macos")] pub mod macos;
58+
#[cfg(target_os = "netbsd")] pub mod netbsd;
59+
#[cfg(target_os = "openbsd")] pub mod openbsd;
60+
#[cfg(target_os = "solaris")] pub mod solaris;
61+
#[cfg(target_os = "emscripten")] pub mod emscripten;
62+
#[cfg(target_os = "fuchsia")] pub mod fuchsia;
63+
#[cfg(target_os = "hermit")] pub mod hermit;
64+
6665
pub mod raw;

0 commit comments

Comments
 (0)