Auto merge of #80014 - jyn514:box-item-kind, r=nnethercote
[rustdoc] Box ItemKind to reduce the size of `Item` This brings the size of `Item` from ``` [src/librustdoc/lib.rs:103] std::mem::size_of::<Item>() = 536 ``` to ``` [src/librustdoc/lib.rs:103] std::mem::size_of::<Item>() = 136 ``` This is an alternative to https://github.com/rust-lang/rust/pull/79967; I don't think it makes sense to make both changes. Helps with #79103.
This commit is contained in:
@@ -187,7 +187,7 @@ impl<'a, 'b> CoverageCalculator<'a, 'b> {
|
||||
|
||||
impl<'a, 'b> fold::DocFolder for CoverageCalculator<'a, 'b> {
|
||||
fn fold_item(&mut self, i: clean::Item) -> Option<clean::Item> {
|
||||
match i.kind {
|
||||
match *i.kind {
|
||||
_ if !i.def_id.is_local() => {
|
||||
// non-local items are skipped because they can be out of the users control,
|
||||
// especially in the case of trait impls, which rustdoc eagerly inlines
|
||||
|
||||
Reference in New Issue
Block a user