summary refs log tree commit diff
path: root/library/alloc/src
diff options
context:
space:
mode:
authorWim Looman <git@nemo157.com>2020-11-04 22:58:37 +0100
committerGuillaume Gomez <guillaume.gomez@huawei.com>2021-10-05 18:15:29 +0200
commit0031ce3a91d8e00691d09fcfca3164bc906f69af (patch)
treed4c46d8429f55026d7630f80cc4156056587769c /library/alloc/src
parent18fdd816b72cbf1547efbb81f164f7a457f17b78 (diff)
downloadrust-0031ce3a91d8e00691d09fcfca3164bc906f69af.tar.gz
rust-0031ce3a91d8e00691d09fcfca3164bc906f69af.zip
Suppress some cfg from being shown in the stdlib docs
Diffstat (limited to 'library/alloc/src')
-rw-r--r--library/alloc/src/lib.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/library/alloc/src/lib.rs b/library/alloc/src/lib.rs
index ca41ce975e4..a9704bed2df 100644
--- a/library/alloc/src/lib.rs
+++ b/library/alloc/src/lib.rs
@@ -65,7 +65,10 @@
 #![doc(
     html_playground_url = "https://play.rust-lang.org/",
     issue_tracker_base_url = "https://github.com/rust-lang/rust/issues/",
-    test(no_crate_inject, attr(allow(unused_variables), deny(warnings)))
+    test(no_crate_inject, attr(allow(unused_variables), deny(warnings))),
+)]
+#![cfg_attr(not(bootstrap),
+    doc(cfg_hide(not(test), not(any(test, bootstrap)), target_has_atomic = "ptr"))
 )]
 #![no_std]
 #![needs_allocator]
@@ -146,6 +149,8 @@
 #![feature(associated_type_bounds)]
 #![feature(slice_group_by)]
 #![feature(decl_macro)]
+#![feature(doc_cfg)]
+#![cfg_attr(not(bootstrap), feature(doc_cfg_hide))]
 // Allow testing this library
 
 #[cfg(test)]