Skip to content

Commit 88d72a9

Browse files
committed
Remove box syntax for Box<ImplItem> construction
ImplItem only has 80 bytes according to compiler internal rustdoc.
1 parent ccf1bdb commit 88d72a9

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/librustdoc/clean/auto_trait.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -117,15 +117,15 @@ impl<'a, 'tcx> AutoTraitFinder<'a, 'tcx> {
117117
attrs: Default::default(),
118118
visibility: Inherited,
119119
item_id: ItemId::Auto { trait_: trait_def_id, for_: item_def_id },
120-
kind: box ImplItem(Impl {
120+
kind: Box::new(ImplItem(Impl {
121121
unsafety: hir::Unsafety::Normal,
122122
generics: new_generics,
123123
trait_: Some(trait_ref.clean(self.cx)),
124124
for_: ty.clean(self.cx),
125125
items: Vec::new(),
126126
polarity,
127127
kind: ImplKind::Auto,
128-
}),
128+
})),
129129
cfg: None,
130130
})
131131
}

src/librustdoc/clean/blanket_impl.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ impl<'a, 'tcx> BlanketImplFinder<'a, 'tcx> {
106106
attrs: Default::default(),
107107
visibility: Inherited,
108108
item_id: ItemId::Blanket { impl_id: impl_def_id, for_: item_def_id },
109-
kind: box ImplItem(Impl {
109+
kind: Box::new(ImplItem(Impl {
110110
unsafety: hir::Unsafety::Normal,
111111
generics: clean_ty_generics(
112112
cx,
@@ -123,8 +123,8 @@ impl<'a, 'tcx> BlanketImplFinder<'a, 'tcx> {
123123
.map(|x| x.clean(cx))
124124
.collect::<Vec<_>>(),
125125
polarity: ty::ImplPolarity::Positive,
126-
kind: ImplKind::Blanket(box trait_ref.0.self_ty().clean(cx)),
127-
}),
126+
kind: ImplKind::Blanket(Box::new(trait_ref.0.self_ty().clean(cx))),
127+
})),
128128
cfg: None,
129129
});
130130
}

0 commit comments

Comments
 (0)