Skip to content

Commit 71213bc

Browse files
Remove cfg(bootstrap) for doc_cfg feature following #141925
1 parent 65e918b commit 71213bc

File tree

3 files changed

+30
-71
lines changed

3 files changed

+30
-71
lines changed

library/alloc/src/lib.rs

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -64,21 +64,14 @@
6464
issue_tracker_base_url = "https://github.com/rust-lang/rust/issues/",
6565
test(no_crate_inject, attr(allow(unused_variables), deny(warnings)))
6666
)]
67-
#![cfg_attr(
68-
bootstrap,
69-
doc(cfg_hide(
70-
not(test),
71-
no_global_oom_handling,
72-
not(no_global_oom_handling),
73-
not(no_rc),
74-
not(no_sync),
75-
target_has_atomic = "ptr"
76-
))
77-
)]
78-
#![cfg_attr(
79-
not(bootstrap),
80-
doc(auto_cfg(hide(no_global_oom_handling, no_rc, no_sync, target_has_atomic = "ptr")))
81-
)]
67+
#![doc(cfg_hide(
68+
not(test),
69+
no_global_oom_handling,
70+
not(no_global_oom_handling),
71+
not(no_rc),
72+
not(no_sync),
73+
target_has_atomic = "ptr"
74+
))]
8275
#![doc(rust_logo)]
8376
#![feature(rustdoc_internals)]
8477
#![no_std]
@@ -198,7 +191,6 @@
198191
//
199192
// Rustdoc features:
200193
#![feature(doc_cfg)]
201-
#![cfg_attr(bootstrap, feature(doc_cfg_hide))]
202194
// Technically, this is a bug in rustdoc: rustdoc sees the documentation on `#[lang = slice_alloc]`
203195
// blocks is for `&[T]`, which also has documentation using this feature in `core`, and gets mad
204196
// that the feature-gate isn't enabled. Ideally, it wouldn't check for the feature gate for docs

library/core/src/lib.rs

Lines changed: 21 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -51,54 +51,27 @@
5151
test(attr(allow(dead_code, deprecated, unused_variables, unused_mut)))
5252
)]
5353
#![doc(rust_logo)]
54-
#![cfg_attr(
55-
bootstrap,
56-
doc(cfg_hide(
57-
no_fp_fmt_parse,
58-
target_pointer_width = "16",
59-
target_pointer_width = "32",
60-
target_pointer_width = "64",
61-
target_has_atomic = "8",
62-
target_has_atomic = "16",
63-
target_has_atomic = "32",
64-
target_has_atomic = "64",
65-
target_has_atomic = "ptr",
66-
target_has_atomic_equal_alignment = "8",
67-
target_has_atomic_equal_alignment = "16",
68-
target_has_atomic_equal_alignment = "32",
69-
target_has_atomic_equal_alignment = "64",
70-
target_has_atomic_equal_alignment = "ptr",
71-
target_has_atomic_load_store = "8",
72-
target_has_atomic_load_store = "16",
73-
target_has_atomic_load_store = "32",
74-
target_has_atomic_load_store = "64",
75-
target_has_atomic_load_store = "ptr",
76-
))
77-
)]
78-
#![cfg_attr(
79-
not(bootstrap),
80-
doc(auto_cfg(hide(
81-
no_fp_fmt_parse,
82-
target_pointer_width = "16",
83-
target_pointer_width = "32",
84-
target_pointer_width = "64",
85-
target_has_atomic = "8",
86-
target_has_atomic = "16",
87-
target_has_atomic = "32",
88-
target_has_atomic = "64",
89-
target_has_atomic = "ptr",
90-
target_has_atomic_equal_alignment = "8",
91-
target_has_atomic_equal_alignment = "16",
92-
target_has_atomic_equal_alignment = "32",
93-
target_has_atomic_equal_alignment = "64",
94-
target_has_atomic_equal_alignment = "ptr",
95-
target_has_atomic_load_store = "8",
96-
target_has_atomic_load_store = "16",
97-
target_has_atomic_load_store = "32",
98-
target_has_atomic_load_store = "64",
99-
target_has_atomic_load_store = "ptr",
100-
)))
101-
)]
54+
#![doc(cfg_hide(
55+
no_fp_fmt_parse,
56+
target_pointer_width = "16",
57+
target_pointer_width = "32",
58+
target_pointer_width = "64",
59+
target_has_atomic = "8",
60+
target_has_atomic = "16",
61+
target_has_atomic = "32",
62+
target_has_atomic = "64",
63+
target_has_atomic = "ptr",
64+
target_has_atomic_equal_alignment = "8",
65+
target_has_atomic_equal_alignment = "16",
66+
target_has_atomic_equal_alignment = "32",
67+
target_has_atomic_equal_alignment = "64",
68+
target_has_atomic_equal_alignment = "ptr",
69+
target_has_atomic_load_store = "8",
70+
target_has_atomic_load_store = "16",
71+
target_has_atomic_load_store = "32",
72+
target_has_atomic_load_store = "64",
73+
target_has_atomic_load_store = "ptr",
74+
))]
10275
#![no_core]
10376
#![rustc_coherence_is_core]
10477
#![rustc_preserve_ub_checks]
@@ -159,7 +132,6 @@
159132
//
160133
// Language features:
161134
// tidy-alphabetical-start
162-
#![cfg_attr(bootstrap, feature(doc_cfg_hide))]
163135
#![feature(abi_unadjusted)]
164136
#![feature(adt_const_params)]
165137
#![feature(allow_internal_unsafe)]

library/std/src/lib.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -235,11 +235,7 @@
235235
test(attr(allow(dead_code, deprecated, unused_variables, unused_mut)))
236236
)]
237237
#![doc(rust_logo)]
238-
#![cfg_attr(
239-
bootstrap,
240-
doc(cfg_hide(not(test), no_global_oom_handling, not(no_global_oom_handling)))
241-
)]
242-
#![cfg_attr(not(bootstrap), doc(auto_cfg(hide(no_global_oom_handling))))]
238+
#![doc(cfg_hide(not(test), no_global_oom_handling, not(no_global_oom_handling)))]
243239
// Don't link to std. We are std.
244240
#![no_std]
245241
// Tell the compiler to link to either panic_abort or panic_unwind
@@ -275,7 +271,6 @@
275271
// tidy-alphabetical-start
276272

277273
// stabilization was reverted after it hit beta
278-
#![cfg_attr(bootstrap, feature(doc_cfg_hide))]
279274
#![feature(alloc_error_handler)]
280275
#![feature(allocator_internals)]
281276
#![feature(allow_internal_unsafe)]

0 commit comments

Comments
 (0)