From 3d2494dbf22c3f2d5c53d8d8b13a2ae4c15d785a Mon Sep 17 00:00:00 2001 From: est31 Date: Mon, 11 Jul 2022 00:13:21 +0200 Subject: [PATCH] Remove box syntax from Box construction The type has 144 bytes according to compiler internal rustdoc. --- src/librustdoc/clean/mod.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/librustdoc/clean/mod.rs b/src/librustdoc/clean/mod.rs index cd028bc4b46..cfcedc0e4c0 100644 --- a/src/librustdoc/clean/mod.rs +++ b/src/librustdoc/clean/mod.rs @@ -1490,7 +1490,7 @@ impl<'tcx> Clean<'tcx, Type> for hir::Ty<'tcx> { let lifetime = if !lifetime.is_elided() { Some(lifetime.clean(cx)) } else { None }; DynTrait(bounds, lifetime) } - TyKind::BareFn(barefn) => BareFunction(box barefn.clean(cx)), + TyKind::BareFn(barefn) => BareFunction(Box::new(barefn.clean(cx))), // Rustdoc handles `TyKind::Err`s by turning them into `Type::Infer`s. TyKind::Infer | TyKind::Err => Infer, TyKind::Typeof(..) => panic!("unimplemented type {:?}", self.kind), @@ -1555,12 +1555,12 @@ fn clean_ty<'tcx>(this: Ty<'tcx>, cx: &mut DocContext<'tcx>, def_id: Option { let did = def.did();