1
Fork 0

rustdoc: factor Type::QPath out into its own box

This reduces the size of Type.
This commit is contained in:
Michael Howell 2022-08-16 12:48:04 -07:00
parent a39bdb1d6b
commit 2aa4aa70dd
7 changed files with 47 additions and 40 deletions

View file

@ -480,10 +480,10 @@ impl FromWithTcx<clean::Type> for Type {
mutable: mutability == ast::Mutability::Mut,
type_: Box::new((*type_).into_tcx(tcx)),
},
QPath { assoc, self_type, trait_, .. } => Type::QualifiedPath {
QPath(box clean::QPathData { assoc, self_type, trait_, .. }) => Type::QualifiedPath {
name: assoc.name.to_string(),
args: Box::new(assoc.args.clone().into_tcx(tcx)),
self_type: Box::new((*self_type).into_tcx(tcx)),
self_type: Box::new(self_type.into_tcx(tcx)),
trait_: trait_.into_tcx(tcx),
},
}