1
Fork 0

Allow adding a set of cfg's to hide from being implicitly doc(cfg)'d

By adding #![doc(cfg_hide(foobar))] to the crate attributes the cfg
 #[cfg(foobar)] (and _only_ that _exact_ cfg) will not be implicitly
treated as a doc(cfg) to render a message in the documentation.
This commit is contained in:
Wim Looman 2020-11-04 21:59:35 +01:00 committed by Guillaume Gomez
parent 10cdbd847f
commit 18fdd816b7
11 changed files with 74 additions and 9 deletions

View file

@ -119,6 +119,8 @@ crate struct Cache {
///
/// Links are indexed by the DefId of the item they document.
crate intra_doc_links: FxHashMap<ItemId, Vec<clean::ItemLink>>,
/// Cfg that have been hidden via #![doc(cfg_hide(...))]
crate hidden_cfg: FxHashSet<clean::cfg::Cfg>,
}
/// This struct is used to wrap the `cache` and `tcx` in order to run `DocFolder`.