Skip to content

Commit 3d2494d

Browse files
committed
Remove box syntax from Box<BareFunctionDecl> construction
The type has 144 bytes according to compiler internal rustdoc.
1 parent 3fa637d commit 3d2494d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/librustdoc/clean/mod.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -1490,7 +1490,7 @@ impl<'tcx> Clean<'tcx, Type> for hir::Ty<'tcx> {
14901490
let lifetime = if !lifetime.is_elided() { Some(lifetime.clean(cx)) } else { None };
14911491
DynTrait(bounds, lifetime)
14921492
}
1493-
TyKind::BareFn(barefn) => BareFunction(box barefn.clean(cx)),
1493+
TyKind::BareFn(barefn) => BareFunction(Box::new(barefn.clean(cx))),
14941494
// Rustdoc handles `TyKind::Err`s by turning them into `Type::Infer`s.
14951495
TyKind::Infer | TyKind::Err => Infer,
14961496
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<DefI
15551555
let ty = cx.tcx.lift(this).expect("FnPtr lift failed");
15561556
let sig = ty.fn_sig(cx.tcx);
15571557
let decl = clean_fn_decl_from_did_and_sig(cx, None, sig);
1558-
BareFunction(box BareFunctionDecl {
1558+
BareFunction(Box::new(BareFunctionDecl {
15591559
unsafety: sig.unsafety(),
15601560
generic_params: Vec::new(),
15611561
decl,
15621562
abi: sig.abi(),
1563-
})
1563+
}))
15641564
}
15651565
ty::Adt(def, substs) => {
15661566
let did = def.did();

0 commit comments

Comments
 (0)