From 0031ce3a91d8e00691d09fcfca3164bc906f69af Mon Sep 17 00:00:00 2001 From: Wim Looman Date: Wed, 4 Nov 2020 22:58:37 +0100 Subject: Suppress some cfg from being shown in the stdlib docs --- library/alloc/src/lib.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'library/alloc/src') 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)] -- cgit 1.4.1-3-g733a5