diff --git a/src/bootstrap/bin/rustdoc.rs b/src/bootstrap/bin/rustdoc.rs index a54e58665cceb..bb5a21e3e405f 100644 --- a/src/bootstrap/bin/rustdoc.rs +++ b/src/bootstrap/bin/rustdoc.rs @@ -37,6 +37,8 @@ fn main() { let mut dylib_path = bootstrap::util::dylib_path(); dylib_path.insert(0, PathBuf::from(libdir.clone())); + //FIXME(misdreavus): once stdsimd uses cfg(rustdoc) instead of cfg(dox), remove the `--cfg dox` + //arguments here let mut cmd = Command::new(rustdoc); cmd.args(&args) .arg("--cfg") diff --git a/src/libcore/macros.rs b/src/libcore/macros.rs index 5b3b2d1635688..0032bedc7ed1d 100644 --- a/src/libcore/macros.rs +++ b/src/libcore/macros.rs @@ -541,7 +541,7 @@ macro_rules! unimplemented { /// into libsyntax itself. /// /// For more information, see documentation for `std`'s macros. -#[cfg(dox)] +#[cfg(rustdoc)] mod builtin { /// Unconditionally causes compilation to fail with the given error message when encountered. diff --git a/src/libstd/macros.rs b/src/libstd/macros.rs index 6945a41a5e73b..b649ec2340e93 100644 --- a/src/libstd/macros.rs +++ b/src/libstd/macros.rs @@ -309,7 +309,7 @@ macro_rules! assert_approx_eq { /// These macros do not have any corresponding definition with a `macro_rules!` /// macro, but are documented here. Their implementations can be found hardcoded /// into libsyntax itself. -#[cfg(dox)] +#[cfg(rustdoc)] mod builtin { /// Unconditionally causes compilation to fail with the given error message when encountered. diff --git a/src/libstd/os/mod.rs b/src/libstd/os/mod.rs index c384ec9168ac4..6bc186e796666 100644 --- a/src/libstd/os/mod.rs +++ b/src/libstd/os/mod.rs @@ -14,7 +14,7 @@ #![allow(missing_docs, bad_style, missing_debug_implementations)] cfg_if! { - if #[cfg(dox)] { + if #[cfg(rustdoc)] { // When documenting libstd we want to show unix/windows/linux modules as // these are the "main modules" that are used across platforms. This diff --git a/src/libstd/sys/mod.rs b/src/libstd/sys/mod.rs index c44db3b107224..61e4ce66eec0f 100644 --- a/src/libstd/sys/mod.rs +++ b/src/libstd/sys/mod.rs @@ -57,7 +57,7 @@ cfg_if! { // then later used in the `std::os` module when documenting, for example, // Windows when we're compiling for Linux. -#[cfg(dox)] +#[cfg(rustdoc)] cfg_if! { if #[cfg(any(unix, target_os = "redox"))] { // On unix we'll document what's already available @@ -77,7 +77,7 @@ cfg_if! { } } -#[cfg(dox)] +#[cfg(rustdoc)] cfg_if! { if #[cfg(windows)] { // On windows we'll just be documenting what's already available diff --git a/src/libstd/sys/unix/mod.rs b/src/libstd/sys/unix/mod.rs index c738003caf1d9..a631ef5ec5cbd 100644 --- a/src/libstd/sys/unix/mod.rs +++ b/src/libstd/sys/unix/mod.rs @@ -13,22 +13,22 @@ use io::{self, ErrorKind}; use libc; -#[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 = "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; -#[cfg(all(not(dox), target_os = "l4re"))] pub use os::linux as platform; -#[cfg(all(not(dox), target_os = "hermit"))] pub use os::hermit as platform; +#[cfg(any(rustdoc, target_os = "linux"))] pub use os::linux as platform; + +#[cfg(all(not(rustdoc), target_os = "android"))] pub use os::android as platform; +#[cfg(all(not(rustdoc), target_os = "bitrig"))] pub use os::bitrig as platform; +#[cfg(all(not(rustdoc), target_os = "dragonfly"))] pub use os::dragonfly as platform; +#[cfg(all(not(rustdoc), target_os = "freebsd"))] pub use os::freebsd as platform; +#[cfg(all(not(rustdoc), target_os = "haiku"))] pub use os::haiku as platform; +#[cfg(all(not(rustdoc), target_os = "ios"))] pub use os::ios as platform; +#[cfg(all(not(rustdoc), target_os = "macos"))] pub use os::macos as platform; +#[cfg(all(not(rustdoc), target_os = "netbsd"))] pub use os::netbsd as platform; +#[cfg(all(not(rustdoc), target_os = "openbsd"))] pub use os::openbsd as platform; +#[cfg(all(not(rustdoc), target_os = "solaris"))] pub use os::solaris as platform; +#[cfg(all(not(rustdoc), target_os = "emscripten"))] pub use os::emscripten as platform; +#[cfg(all(not(rustdoc), target_os = "fuchsia"))] pub use os::fuchsia as platform; +#[cfg(all(not(rustdoc), target_os = "l4re"))] pub use os::linux as platform; +#[cfg(all(not(rustdoc), target_os = "hermit"))] pub use os::hermit as platform; pub use self::rand::hashmap_random_keys; pub use libc::strlen; diff --git a/src/libstd/sys/windows/c.rs b/src/libstd/sys/windows/c.rs index e514a56dcc436..10f48c3c308a7 100644 --- a/src/libstd/sys/windows/c.rs +++ b/src/libstd/sys/windows/c.rs @@ -794,7 +794,7 @@ pub struct FLOATING_SAVE_AREA { // will not appear in the final documentation. This should be also defined for // other architectures supported by Windows such as ARM, and for historical // interest, maybe MIPS and PowerPC as well. -#[cfg(all(dox, not(any(target_arch = "x86_64", target_arch = "x86", target_arch = "aarch64"))))] +#[cfg(all(rustdoc, not(any(target_arch = "x86_64", target_arch = "x86", target_arch = "aarch64"))))] pub enum CONTEXT {} #[cfg(target_arch = "aarch64")]