Now also displays portability tags.
This commit is contained in:
parent
1e2ab998c3
commit
fca088ae23
5 changed files with 36 additions and 14 deletions
|
|
@ -282,9 +282,14 @@ fn item_module(w: &mut Buffer, cx: &Context<'_>, item: &clean::Item, items: &[cl
|
|||
}
|
||||
|
||||
clean::ImportItem(ref import) => {
|
||||
let (stab, stab_tags) = if let Some(def_id) = import.source.did {
|
||||
// Just need an item with the correct def_id
|
||||
let import_item = clean::Item { def_id, ..myitem.clone() };
|
||||
let (stab, stab_tags) = if let (Some(def_id), Some(attrs)) =
|
||||
(import.source.did, import.source.attrs.clone())
|
||||
{
|
||||
let attrs = Box::new(attrs);
|
||||
|
||||
// Just need an item with the correct def_id and attrs
|
||||
let import_item = clean::Item { def_id, attrs, ..myitem.clone() };
|
||||
|
||||
let stab = import_item.stability_class(cx.tcx());
|
||||
let stab_tags = Some(extra_info_tags(&import_item, item, cx.tcx()));
|
||||
(stab, stab_tags)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue