Exposed all platform-specific documentation.
This commit is contained in:
parent
a2b888675a
commit
b4114ebe3a
7 changed files with 75 additions and 30 deletions
|
@ -314,6 +314,7 @@
|
|||
#![feature(untagged_unions)]
|
||||
#![feature(unwind_attributes)]
|
||||
#![feature(vec_push_all)]
|
||||
#![feature(doc_cfg)]
|
||||
#![cfg_attr(test, feature(update_panic_count))]
|
||||
|
||||
#![default_lib_allocator]
|
||||
|
|
|
@ -13,26 +13,36 @@
|
|||
#![stable(feature = "os", since = "1.0.0")]
|
||||
#![allow(missing_docs, bad_style, missing_debug_implementations)]
|
||||
|
||||
#[cfg(any(target_os = "redox", unix))]
|
||||
#[cfg(all(not(dox), any(target_os = "redox", unix)))]
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
pub use sys::ext as unix;
|
||||
#[cfg(windows)]
|
||||
#[cfg(all(not(dox), windows))]
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
pub use sys::ext as windows;
|
||||
|
||||
#[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 = "linux")] pub mod linux;
|
||||
#[cfg(target_os = "macos")] pub mod macos;
|
||||
#[cfg(target_os = "nacl")] pub mod nacl;
|
||||
#[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(dox)]
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
pub use sys::unix_ext as unix;
|
||||
#[cfg(dox)]
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
pub use sys::windows_ext as windows;
|
||||
|
||||
#[cfg(any(dox, target_os = "linux"))]
|
||||
#[doc(cfg(target_os = "linux"))]
|
||||
pub mod linux;
|
||||
|
||||
#[cfg(all(not(dox), target_os = "android"))] pub mod android;
|
||||
#[cfg(all(not(dox), target_os = "bitrig"))] pub mod bitrig;
|
||||
#[cfg(all(not(dox), target_os = "dragonfly"))] pub mod dragonfly;
|
||||
#[cfg(all(not(dox), target_os = "freebsd"))] pub mod freebsd;
|
||||
#[cfg(all(not(dox), target_os = "haiku"))] pub mod haiku;
|
||||
#[cfg(all(not(dox), target_os = "ios"))] pub mod ios;
|
||||
#[cfg(all(not(dox), target_os = "macos"))] pub mod macos;
|
||||
#[cfg(all(not(dox), target_os = "nacl"))] pub mod nacl;
|
||||
#[cfg(all(not(dox), target_os = "netbsd"))] pub mod netbsd;
|
||||
#[cfg(all(not(dox), target_os = "openbsd"))] pub mod openbsd;
|
||||
#[cfg(all(not(dox), target_os = "solaris"))] pub mod solaris;
|
||||
#[cfg(all(not(dox), target_os = "emscripten"))] pub mod emscripten;
|
||||
#[cfg(all(not(dox), target_os = "fuchsia"))] pub mod fuchsia;
|
||||
|
||||
pub mod raw;
|
||||
|
|
|
@ -45,3 +45,33 @@ mod imp;
|
|||
#[cfg(target_os = "redox")]
|
||||
#[path = "redox/mod.rs"]
|
||||
mod imp;
|
||||
|
||||
|
||||
// Import essential modules from both platforms when documenting.
|
||||
|
||||
#[cfg(all(dox, not(unix)))]
|
||||
use os::linux as platform;
|
||||
|
||||
#[cfg(all(dox, not(any(unix, target_os = "redox"))))]
|
||||
#[path = "unix/ext/mod.rs"]
|
||||
pub mod unix_ext;
|
||||
|
||||
#[cfg(all(dox, any(unix, target_os = "redox")))]
|
||||
pub use self::ext as unix_ext;
|
||||
|
||||
|
||||
#[cfg(all(dox, not(windows)))]
|
||||
#[macro_use]
|
||||
#[path = "windows/compat.rs"]
|
||||
mod compat;
|
||||
|
||||
#[cfg(all(dox, not(windows)))]
|
||||
#[path = "windows/c.rs"]
|
||||
mod c;
|
||||
|
||||
#[cfg(all(dox, not(windows)))]
|
||||
#[path = "windows/ext/mod.rs"]
|
||||
pub mod windows_ext;
|
||||
|
||||
#[cfg(all(dox, windows))]
|
||||
pub use self::ext as windows_ext;
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
//! ```
|
||||
|
||||
#![stable(feature = "rust1", since = "1.0.0")]
|
||||
#![doc(cfg(target_os = "redox"))]
|
||||
|
||||
pub mod ffi;
|
||||
pub mod fs;
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
//! ```
|
||||
|
||||
#![stable(feature = "rust1", since = "1.0.0")]
|
||||
#![doc(cfg(unix))]
|
||||
|
||||
pub mod io;
|
||||
pub mod ffi;
|
||||
|
|
|
@ -13,20 +13,21 @@
|
|||
use io::{self, ErrorKind};
|
||||
use libc;
|
||||
|
||||
#[cfg(target_os = "android")] pub use os::android as platform;
|
||||
#[cfg(target_os = "bitrig")] pub use os::bitrig as platform;
|
||||
#[cfg(target_os = "dragonfly")] pub use os::dragonfly as platform;
|
||||
#[cfg(target_os = "freebsd")] pub use os::freebsd as platform;
|
||||
#[cfg(target_os = "haiku")] pub use os::haiku as platform;
|
||||
#[cfg(target_os = "ios")] pub use os::ios as platform;
|
||||
#[cfg(target_os = "linux")] pub use os::linux as platform;
|
||||
#[cfg(target_os = "macos")] pub use os::macos as platform;
|
||||
#[cfg(target_os = "nacl")] pub use os::nacl as platform;
|
||||
#[cfg(target_os = "netbsd")] pub use os::netbsd as platform;
|
||||
#[cfg(target_os = "openbsd")] pub use os::openbsd as platform;
|
||||
#[cfg(target_os = "solaris")] pub use os::solaris as platform;
|
||||
#[cfg(target_os = "emscripten")] pub use os::emscripten as platform;
|
||||
#[cfg(target_os = "fuchsia")] pub use os::fuchsia as platform;
|
||||
#[cfg(any(dox, target_os = "linux"))] pub use os::linux as platform;
|
||||
|
||||
#[cfg(all(not(dox), target_os = "android"))] pub use os::android as platform;
|
||||
#[cfg(all(not(dox), target_os = "bitrig"))] pub use os::bitrig as platform;
|
||||
#[cfg(all(not(dox), target_os = "dragonfly"))] pub use os::dragonfly as platform;
|
||||
#[cfg(all(not(dox), target_os = "freebsd"))] pub use os::freebsd as platform;
|
||||
#[cfg(all(not(dox), target_os = "haiku"))] pub use os::haiku as platform;
|
||||
#[cfg(all(not(dox), target_os = "ios"))] pub use os::ios as platform;
|
||||
#[cfg(all(not(dox), target_os = "macos"))] pub use os::macos as platform;
|
||||
#[cfg(all(not(dox), target_os = "nacl"))] pub use os::nacl as platform;
|
||||
#[cfg(all(not(dox), target_os = "netbsd"))] pub use os::netbsd as platform;
|
||||
#[cfg(all(not(dox), target_os = "openbsd"))] pub use os::openbsd as platform;
|
||||
#[cfg(all(not(dox), target_os = "solaris"))] pub use os::solaris as platform;
|
||||
#[cfg(all(not(dox), target_os = "emscripten"))] pub use os::emscripten as platform;
|
||||
#[cfg(all(not(dox), target_os = "fuchsia"))] pub use os::fuchsia as platform;
|
||||
|
||||
#[macro_use]
|
||||
pub mod weak;
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
//! platform-agnostic idioms would not normally support.
|
||||
|
||||
#![stable(feature = "rust1", since = "1.0.0")]
|
||||
#![doc(cfg(windows))]
|
||||
|
||||
pub mod ffi;
|
||||
pub mod fs;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue