diff options
| author | bors <bors@rust-lang.org> | 2020-12-29 10:41:01 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2020-12-29 10:41:01 +0000 |
| commit | 158f8d034b15e65ba8dc0d066358dd0632bfcd6e (patch) | |
| tree | ff4da49406acf0d16cc087eb51821586dc6d240d /src/librustdoc/formats/renderer.rs | |
| parent | e2a2592885539ca97bfb1232669e7519a0c0703b (diff) | |
| parent | 5fce0dd787f319d229ecbd679781655549a418f2 (diff) | |
| download | rust-158f8d034b15e65ba8dc0d066358dd0632bfcd6e.tar.gz rust-158f8d034b15e65ba8dc0d066358dd0632bfcd6e.zip | |
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.
Diffstat (limited to 'src/librustdoc/formats/renderer.rs')
| -rw-r--r-- | src/librustdoc/formats/renderer.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/librustdoc/formats/renderer.rs b/src/librustdoc/formats/renderer.rs index fbbd3c1ccf5..e84a9853d9b 100644 --- a/src/librustdoc/formats/renderer.rs +++ b/src/librustdoc/formats/renderer.rs @@ -89,7 +89,7 @@ crate fn run_format<'tcx, T: FormatRenderer<'tcx>>( } cx.mod_item_in(&item, &name, &cache)?; - let module = match item.kind { + let module = match *item.kind { clean::StrippedItem(box clean::ModuleItem(m)) | clean::ModuleItem(m) => m, _ => unreachable!(), }; |
