Auto merge of #100645 - notriddle:notriddle/rustdoc-diet-plan, r=GuillaumeGomez
rustdoc: strategic boxing to reduce the size of ItemKind and Type The `Type` change redesigns `QPath` to box the entire data structure instead of boxing `self_type` and the `trait_`. This reduces the size of several `ItemKind` variants, leaving `Impl` as the biggest variant. The `ItemKind` change boxes that variant's payload.
This commit is contained in:
commit
650bff80a6
8 changed files with 54 additions and 47 deletions
|
@ -2632,8 +2632,8 @@ fn collect_paths_for_type(first_ty: clean::Type, cache: &Cache) -> Vec<String> {
|
|||
clean::Type::BorrowedRef { type_, .. } => {
|
||||
work.push_back(*type_);
|
||||
}
|
||||
clean::Type::QPath { self_type, trait_, .. } => {
|
||||
work.push_back(*self_type);
|
||||
clean::Type::QPath(box clean::QPathData { self_type, trait_, .. }) => {
|
||||
work.push_back(self_type);
|
||||
process_path(trait_.def_id());
|
||||
}
|
||||
_ => {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue