rustdoc: box ItemKind::Trait
This reduces the memory consumption of ItemKind.
This commit is contained in:
parent
2aa4aa70dd
commit
238bcc940f
5 changed files with 7 additions and 7 deletions
|
@ -248,7 +248,7 @@ fn from_clean_item(item: clean::Item, tcx: TyCtxt<'_>) -> ItemEnum {
|
|||
VariantItem(v) => ItemEnum::Variant(v.into_tcx(tcx)),
|
||||
FunctionItem(f) => ItemEnum::Function(from_function(f, header.unwrap(), tcx)),
|
||||
ForeignFunctionItem(f) => ItemEnum::Function(from_function(f, header.unwrap(), tcx)),
|
||||
TraitItem(t) => ItemEnum::Trait(t.into_tcx(tcx)),
|
||||
TraitItem(t) => ItemEnum::Trait((*t).into_tcx(tcx)),
|
||||
TraitAliasItem(t) => ItemEnum::TraitAlias(t.into_tcx(tcx)),
|
||||
MethodItem(m, _) => ItemEnum::Method(from_function_method(m, true, header.unwrap(), tcx)),
|
||||
TyMethodItem(m) => ItemEnum::Method(from_function_method(m, false, header.unwrap(), tcx)),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue