Skip to content

Commit ad2169c

Browse files
use cfg(rustdoc) instead of cfg(dox) in std and friends
1 parent d7e496f commit ad2169c

File tree

7 files changed

+24
-22
lines changed

7 files changed

+24
-22
lines changed

src/bootstrap/bin/rustdoc.rs

+2
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ fn main() {
3737
let mut dylib_path = bootstrap::util::dylib_path();
3838
dylib_path.insert(0, PathBuf::from(libdir.clone()));
3939

40+
//FIXME(misdreavus): once stdsimd uses cfg(rustdoc) instead of cfg(dox), remove the `--cfg dox`
41+
//arguments here
4042
let mut cmd = Command::new(rustdoc);
4143
cmd.args(&args)
4244
.arg("--cfg")

src/libcore/macros.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -541,7 +541,7 @@ macro_rules! unimplemented {
541541
/// into libsyntax itself.
542542
///
543543
/// For more information, see documentation for `std`'s macros.
544-
#[cfg(dox)]
544+
#[cfg(rustdoc)]
545545
mod builtin {
546546

547547
/// Unconditionally causes compilation to fail with the given error message when encountered.

src/libstd/macros.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ macro_rules! assert_approx_eq {
309309
/// These macros do not have any corresponding definition with a `macro_rules!`
310310
/// macro, but are documented here. Their implementations can be found hardcoded
311311
/// into libsyntax itself.
312-
#[cfg(dox)]
312+
#[cfg(rustdoc)]
313313
mod builtin {
314314

315315
/// Unconditionally causes compilation to fail with the given error message when encountered.

src/libstd/os/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
#![allow(missing_docs, bad_style, missing_debug_implementations)]
1515

1616
cfg_if! {
17-
if #[cfg(dox)] {
17+
if #[cfg(rustdoc)] {
1818

1919
// When documenting libstd we want to show unix/windows/linux modules as
2020
// these are the "main modules" that are used across platforms. This

src/libstd/sys/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ cfg_if! {
5757
// then later used in the `std::os` module when documenting, for example,
5858
// Windows when we're compiling for Linux.
5959

60-
#[cfg(dox)]
60+
#[cfg(rustdoc)]
6161
cfg_if! {
6262
if #[cfg(any(unix, target_os = "redox"))] {
6363
// On unix we'll document what's already available
@@ -77,7 +77,7 @@ cfg_if! {
7777
}
7878
}
7979

80-
#[cfg(dox)]
80+
#[cfg(rustdoc)]
8181
cfg_if! {
8282
if #[cfg(windows)] {
8383
// On windows we'll just be documenting what's already available

src/libstd/sys/unix/mod.rs

+16-16
Original file line numberDiff line numberDiff line change
@@ -13,22 +13,22 @@
1313
use io::{self, ErrorKind};
1414
use libc;
1515

16-
#[cfg(any(dox, target_os = "linux"))] pub use os::linux as platform;
17-
18-
#[cfg(all(not(dox), target_os = "android"))] pub use os::android as platform;
19-
#[cfg(all(not(dox), target_os = "bitrig"))] pub use os::bitrig as platform;
20-
#[cfg(all(not(dox), target_os = "dragonfly"))] pub use os::dragonfly as platform;
21-
#[cfg(all(not(dox), target_os = "freebsd"))] pub use os::freebsd as platform;
22-
#[cfg(all(not(dox), target_os = "haiku"))] pub use os::haiku as platform;
23-
#[cfg(all(not(dox), target_os = "ios"))] pub use os::ios as platform;
24-
#[cfg(all(not(dox), target_os = "macos"))] pub use os::macos as platform;
25-
#[cfg(all(not(dox), target_os = "netbsd"))] pub use os::netbsd as platform;
26-
#[cfg(all(not(dox), target_os = "openbsd"))] pub use os::openbsd as platform;
27-
#[cfg(all(not(dox), target_os = "solaris"))] pub use os::solaris as platform;
28-
#[cfg(all(not(dox), target_os = "emscripten"))] pub use os::emscripten as platform;
29-
#[cfg(all(not(dox), target_os = "fuchsia"))] pub use os::fuchsia as platform;
30-
#[cfg(all(not(dox), target_os = "l4re"))] pub use os::linux as platform;
31-
#[cfg(all(not(dox), target_os = "hermit"))] pub use os::hermit as platform;
16+
#[cfg(any(rustdoc, target_os = "linux"))] pub use os::linux as platform;
17+
18+
#[cfg(all(not(rustdoc), target_os = "android"))] pub use os::android as platform;
19+
#[cfg(all(not(rustdoc), target_os = "bitrig"))] pub use os::bitrig as platform;
20+
#[cfg(all(not(rustdoc), target_os = "dragonfly"))] pub use os::dragonfly as platform;
21+
#[cfg(all(not(rustdoc), target_os = "freebsd"))] pub use os::freebsd as platform;
22+
#[cfg(all(not(rustdoc), target_os = "haiku"))] pub use os::haiku as platform;
23+
#[cfg(all(not(rustdoc), target_os = "ios"))] pub use os::ios as platform;
24+
#[cfg(all(not(rustdoc), target_os = "macos"))] pub use os::macos as platform;
25+
#[cfg(all(not(rustdoc), target_os = "netbsd"))] pub use os::netbsd as platform;
26+
#[cfg(all(not(rustdoc), target_os = "openbsd"))] pub use os::openbsd as platform;
27+
#[cfg(all(not(rustdoc), target_os = "solaris"))] pub use os::solaris as platform;
28+
#[cfg(all(not(rustdoc), target_os = "emscripten"))] pub use os::emscripten as platform;
29+
#[cfg(all(not(rustdoc), target_os = "fuchsia"))] pub use os::fuchsia as platform;
30+
#[cfg(all(not(rustdoc), target_os = "l4re"))] pub use os::linux as platform;
31+
#[cfg(all(not(rustdoc), target_os = "hermit"))] pub use os::hermit as platform;
3232

3333
pub use self::rand::hashmap_random_keys;
3434
pub use libc::strlen;

src/libstd/sys/windows/c.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -794,7 +794,7 @@ pub struct FLOATING_SAVE_AREA {
794794
// will not appear in the final documentation. This should be also defined for
795795
// other architectures supported by Windows such as ARM, and for historical
796796
// interest, maybe MIPS and PowerPC as well.
797-
#[cfg(all(dox, not(any(target_arch = "x86_64", target_arch = "x86", target_arch = "aarch64"))))]
797+
#[cfg(all(rustdoc, not(any(target_arch = "x86_64", target_arch = "x86", target_arch = "aarch64"))))]
798798
pub enum CONTEXT {}
799799

800800
#[cfg(target_arch = "aarch64")]

0 commit comments

Comments
 (0)