diff options
| author | Michael Howell <michael@notriddle.com> | 2023-10-22 22:50:25 -0700 |
|---|---|---|
| committer | Michael Howell <michael@notriddle.com> | 2023-10-22 22:50:25 -0700 |
| commit | b67985e1132806c6451b9924aab67e2da8d73885 (patch) | |
| tree | 98e73fe46e707c18eed753413fc0b3c86c38074c /src/librustdoc/json | |
| parent | 111adde7ed86b848e61d1bd3cb431f9c52584317 (diff) | |
| download | rust-b67985e1132806c6451b9924aab67e2da8d73885.tar.gz rust-b67985e1132806c6451b9924aab67e2da8d73885.zip | |
rustdoc: wrap Type with Box instead of Generics
When these `Box<Generics>` types were introduced, `Generics` was made with `Vec` and much larger. Now that it's made with `ThinVec`, `Type` is bigger and should be boxed instead.
Diffstat (limited to 'src/librustdoc/json')
| -rw-r--r-- | src/librustdoc/json/conversions.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/librustdoc/json/conversions.rs b/src/librustdoc/json/conversions.rs index 17e2172a270..563e0cffddd 100644 --- a/src/librustdoc/json/conversions.rs +++ b/src/librustdoc/json/conversions.rs @@ -177,7 +177,7 @@ impl FromWithTcx<clean::Constant> for Constant { let expr = constant.expr(tcx); let value = constant.value(tcx); let is_literal = constant.is_literal(tcx); - Constant { type_: constant.type_.into_tcx(tcx), expr, value, is_literal } + Constant { type_: (*constant.type_).into_tcx(tcx), expr, value, is_literal } } } @@ -325,11 +325,11 @@ fn from_clean_item(item: clean::Item, tcx: TyCtxt<'_>) -> ItemEnum { } // FIXME(generic_const_items): Add support for generic associated consts. TyAssocConstItem(_generics, ty) => { - ItemEnum::AssocConst { type_: ty.into_tcx(tcx), default: None } + ItemEnum::AssocConst { type_: (*ty).into_tcx(tcx), default: None } } // FIXME(generic_const_items): Add support for generic associated consts. AssocConstItem(_generics, ty, default) => { - ItemEnum::AssocConst { type_: ty.into_tcx(tcx), default: Some(default.expr(tcx)) } + ItemEnum::AssocConst { type_: (*ty).into_tcx(tcx), default: Some(default.expr(tcx)) } } TyAssocTypeItem(g, b) => ItemEnum::AssocType { generics: g.into_tcx(tcx), |
