The type has 240 bytes according to compiler internal rustdoc.
attrs: Box::new(clean::Attributes::default()),
item_id: ItemId::Primitive(prim_ty, did.krate),
visibility: clean::Public,
- kind: box clean::ImportItem(clean::Import::new_simple(
+ kind: Box::new(clean::ImportItem(clean::Import::new_simple(
item.ident.name,
clean::ImportSource {
path: clean::Path {
did: None,
},
true,
- )),
+ ))),
cfg: None,
});
} else if let Some(i) = try_inline(cx, did, None, res, item.ident.name, None, visited) {
attrs: Box::new(attrs.clean(cx)),
item_id: crate_def_id.into(),
visibility: clean_visibility(ty_vis),
- kind: box ExternCrateItem { src: orig_name },
+ kind: Box::new(ExternCrateItem { src: orig_name }),
cfg: attrs.cfg(cx.tcx, &cx.cache.hidden_cfg),
}]
}
clean_visibility(cx.tcx.visibility(def_id))
};
- Item { item_id: def_id.into(), kind: box kind, name, attrs, visibility, cfg }
+ Item { item_id: def_id.into(), kind: Box::new(kind), name, attrs, visibility, cfg }
}
/// Finds all `doc` attributes as NameValues and returns their corresponding values, joined
pub(crate) fn strip_item(mut item: Item) -> Item {
if !matches!(*item.kind, StrippedItem(..)) {
- item.kind = box StrippedItem(item.kind);
+ item.kind = Box::new(StrippedItem(item.kind));
}
item
}
/// don't override!
fn fold_item_recur(&mut self, mut item: Item) -> Item {
- item.kind = box match *item.kind {
- StrippedItem(box i) => StrippedItem(box self.fold_inner_recur(i)),
+ item.kind = Box::new(match *item.kind {
+ StrippedItem(box i) => StrippedItem(Box::new(self.fold_inner_recur(i))),
_ => self.fold_inner_recur(*item.kind),
- };
+ });
item
}