diff options
| author | Wim Looman <git@nemo157.com> | 2020-11-04 21:59:35 +0100 |
|---|---|---|
| committer | Guillaume Gomez <guillaume.gomez@huawei.com> | 2021-10-05 18:04:15 +0200 |
| commit | 18fdd816b72cbf1547efbb81f164f7a457f17b78 (patch) | |
| tree | 838520193f9832ddafa6ab4977b415edf5f0208a /src/librustdoc/html | |
| parent | 10cdbd847fd00d093ce89a4fffde5d90c8bb9817 (diff) | |
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.
Diffstat (limited to 'src/librustdoc/html')
| -rw-r--r-- | src/librustdoc/html/render/print_item.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/librustdoc/html/render/print_item.rs b/src/librustdoc/html/render/print_item.rs index e68e1223171..e3ffc1e3f21 100644 --- a/src/librustdoc/html/render/print_item.rs +++ b/src/librustdoc/html/render/print_item.rs @@ -323,7 +323,7 @@ fn item_module(w: &mut Buffer, cx: &Context<'_>, item: &clean::Item, items: &[cl let import_item = clean::Item { def_id: import_def_id.into(), attrs: import_attrs, - cfg: ast_attrs.cfg(cx.tcx()), + cfg: ast_attrs.cfg(cx.tcx(), &cx.cache().hidden_cfg), ..myitem.clone() }; |
