diff options
| author | Michael Howell <michael@notriddle.com> | 2022-08-16 13:08:54 -0700 |
|---|---|---|
| committer | Michael Howell <michael@notriddle.com> | 2022-08-16 13:09:37 -0700 |
| commit | 238bcc940fecd89f69a305b271d06bcd9bc2ed2f (patch) | |
| tree | 869ed93d5ad5b808a75ea7ce6673d6fa7e19ecb5 /src/librustdoc/json | |
| parent | 2aa4aa70ddd11ebc56667dbb3907c93a5a0176c2 (diff) | |
| download | rust-238bcc940fecd89f69a305b271d06bcd9bc2ed2f.tar.gz rust-238bcc940fecd89f69a305b271d06bcd9bc2ed2f.zip | |
rustdoc: box ItemKind::Trait
This reduces the memory consumption of ItemKind.
Diffstat (limited to 'src/librustdoc/json')
| -rw-r--r-- | src/librustdoc/json/conversions.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/librustdoc/json/conversions.rs b/src/librustdoc/json/conversions.rs index 6221591ca25..c4e8b6f5f84 100644 --- a/src/librustdoc/json/conversions.rs +++ b/src/librustdoc/json/conversions.rs @@ -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)), |
