diff options
| author | Guillaume Gomez <guillaume.gomez@huawei.com> | 2023-06-26 13:47:19 +0200 |
|---|---|---|
| committer | Guillaume Gomez <guillaume.gomez@huawei.com> | 2023-11-22 17:22:29 +0100 |
| commit | 14ed92c33f2505241001e06c6d34f1c7d538fb66 (patch) | |
| tree | 83aa1958f9ac04c40d89a4b81980189980856b1e /src/librustdoc/html/render | |
| parent | 73bc12199ea8c7651ed98b069c0dd6b0bb5fabcf (diff) | |
| download | rust-14ed92c33f2505241001e06c6d34f1c7d538fb66.tar.gz rust-14ed92c33f2505241001e06c6d34f1c7d538fb66.zip | |
Don't merge cfg and doc(cfg) attributes for re-exports
Diffstat (limited to 'src/librustdoc/html/render')
| -rw-r--r-- | src/librustdoc/html/render/print_item.rs | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/src/librustdoc/html/render/print_item.rs b/src/librustdoc/html/render/print_item.rs index 8fdbef65135..8e009ba2294 100644 --- a/src/librustdoc/html/render/print_item.rs +++ b/src/librustdoc/html/render/print_item.rs @@ -1,5 +1,3 @@ -use clean::AttributesExt; - use rustc_data_structures::captures::Captures; use rustc_data_structures::fx::{FxHashMap, FxHashSet}; use rustc_hir as hir; @@ -464,16 +462,9 @@ fn item_module(w: &mut Buffer, cx: &mut Context<'_>, item: &clean::Item, items: clean::ImportItem(ref import) => { let stab_tags = if let Some(import_def_id) = import.source.did { - let ast_attrs = tcx.get_attrs_unchecked(import_def_id); - let import_attrs = Box::new(clean::Attributes::from_ast(ast_attrs)); - // Just need an item with the correct def_id and attrs - let import_item = clean::Item { - item_id: import_def_id.into(), - attrs: import_attrs, - cfg: ast_attrs.cfg(tcx, &cx.cache().hidden_cfg), - ..myitem.clone() - }; + let import_item = + clean::Item { item_id: import_def_id.into(), ..myitem.clone() }; let stab_tags = Some(extra_info_tags(&import_item, item, tcx).to_string()); stab_tags |
