diff options
| author | bors <bors@rust-lang.org> | 2023-12-15 12:49:36 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-12-15 12:49:36 +0000 |
| commit | 4d1bd0db7f489b22c6d8aa2385937a95412c015b (patch) | |
| tree | 46e6670d963d745f56ddd55006ea49c8fbdc0387 /src/librustdoc/html/render | |
| parent | 96df4943409564a187894018f15f795426dc2e1f (diff) | |
| parent | 25216b65f49a8cf0dd68e6450b44be3d5ccd78d5 (diff) | |
| download | rust-4d1bd0db7f489b22c6d8aa2385937a95412c015b.tar.gz rust-4d1bd0db7f489b22c6d8aa2385937a95412c015b.zip | |
Auto merge of #118975 - GuillaumeGomez:rollup-0emhjx0, r=GuillaumeGomez
Rollup of 4 pull requests Successful merges: - #113091 (Don't merge cfg and doc(cfg) attributes for re-exports) - #115660 (rustdoc: allow resizing the sidebar / hiding the top bar) - #118863 (rustc_mir_build: Enforce `rustc::potential_query_instability` lint) - #118909 (Some cleanup and improvement for invalid ref casting impl) r? `@ghost` `@rustbot` modify labels: rollup
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 ff7ce01e807..5ca623f01f1 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; @@ -465,16 +463,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 |
