@@ -9,11 +9,13 @@ use std::sync::Arc;
99use std:: { slice, vec} ;
1010
1111use arrayvec:: ArrayVec ;
12+
1213use rustc_ast:: attr;
1314use rustc_ast:: util:: comments:: beautify_doc_string;
1415use rustc_ast:: { self as ast, AttrStyle } ;
1516use rustc_attr:: { ConstStability , Deprecation , Stability , StabilityLevel } ;
1617use rustc_data_structures:: fx:: { FxHashMap , FxHashSet } ;
18+ use rustc_data_structures:: thin_vec:: ThinVec ;
1719use rustc_feature:: UnstableFeatures ;
1820use rustc_hir as hir;
1921use rustc_hir:: def:: { CtorKind , Res } ;
@@ -54,7 +56,7 @@ crate struct Crate {
5456 crate src : FileName ,
5557 crate module : Item ,
5658 crate externs : Vec < ( CrateNum , ExternalCrate ) > ,
57- crate primitives : Vec < ( DefId , PrimitiveType ) > ,
59+ crate primitives : ThinVec < ( DefId , PrimitiveType ) > ,
5860 // These are later on moved into `CACHEKEY`, leaving the map empty.
5961 // Only here so that they can be filtered through the rustdoc passes.
6062 crate external_traits : Rc < RefCell < FxHashMap < DefId , TraitWithExtraInfo > > > ,
@@ -73,8 +75,8 @@ crate struct ExternalCrate {
7375 crate name : Symbol ,
7476 crate src : FileName ,
7577 crate attrs : Attributes ,
76- crate primitives : Vec < ( DefId , PrimitiveType ) > ,
77- crate keywords : Vec < ( DefId , Symbol ) > ,
78+ crate primitives : ThinVec < ( DefId , PrimitiveType ) > ,
79+ crate keywords : ThinVec < ( DefId , Symbol ) > ,
7880}
7981
8082/// Anything with a source location and set of attributes and, optionally, a
0 commit comments