@@ -9,11 +9,13 @@ use std::sync::Arc;
9
9
use std:: { slice, vec} ;
10
10
11
11
use arrayvec:: ArrayVec ;
12
+
12
13
use rustc_ast:: attr;
13
14
use rustc_ast:: util:: comments:: beautify_doc_string;
14
15
use rustc_ast:: { self as ast, AttrStyle } ;
15
16
use rustc_attr:: { ConstStability , Deprecation , Stability , StabilityLevel } ;
16
17
use rustc_data_structures:: fx:: { FxHashMap , FxHashSet } ;
18
+ use rustc_data_structures:: thin_vec:: ThinVec ;
17
19
use rustc_feature:: UnstableFeatures ;
18
20
use rustc_hir as hir;
19
21
use rustc_hir:: def:: { CtorKind , Res } ;
@@ -54,7 +56,7 @@ crate struct Crate {
54
56
crate src : FileName ,
55
57
crate module : Item ,
56
58
crate externs : Vec < ( CrateNum , ExternalCrate ) > ,
57
- crate primitives : Vec < ( DefId , PrimitiveType ) > ,
59
+ crate primitives : ThinVec < ( DefId , PrimitiveType ) > ,
58
60
// These are later on moved into `CACHEKEY`, leaving the map empty.
59
61
// Only here so that they can be filtered through the rustdoc passes.
60
62
crate external_traits : Rc < RefCell < FxHashMap < DefId , TraitWithExtraInfo > > > ,
@@ -73,8 +75,8 @@ crate struct ExternalCrate {
73
75
crate name : Symbol ,
74
76
crate src : FileName ,
75
77
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 ) > ,
78
80
}
79
81
80
82
/// Anything with a source location and set of attributes and, optionally, a
0 commit comments