@@ -811,33 +811,34 @@ pub struct CtxtInterners<'tcx> {
811
811
}
812
812
813
813
impl < ' tcx > CtxtInterners < ' tcx > {
814
- fn new ( arena : & ' tcx WorkerLocal < Arena < ' tcx > > ) -> CtxtInterners < ' tcx > {
814
+ fn new ( arena : & ' tcx WorkerLocal < Arena < ' tcx > > ) -> CtxtInterners < ' tcx > {
815
815
CtxtInterners {
816
816
arena,
817
- type_ : Default :: default ( ) ,
818
- const_lists : Default :: default ( ) ,
819
- args : Default :: default ( ) ,
820
- type_lists : Default :: default ( ) ,
821
- region : Default :: default ( ) ,
822
- poly_existential_predicates : Default :: default ( ) ,
823
- canonical_var_infos : Default :: default ( ) ,
824
- predicate : Default :: default ( ) ,
825
- clauses : Default :: default ( ) ,
826
- projs : Default :: default ( ) ,
827
- place_elems : Default :: default ( ) ,
828
- const_ : Default :: default ( ) ,
829
- pat : Default :: default ( ) ,
830
- const_allocation : Default :: default ( ) ,
831
- bound_variable_kinds : Default :: default ( ) ,
832
- layout : Default :: default ( ) ,
833
- adt_def : Default :: default ( ) ,
834
- external_constraints : Default :: default ( ) ,
835
- predefined_opaques_in_body : Default :: default ( ) ,
836
- fields : Default :: default ( ) ,
837
- local_def_ids : Default :: default ( ) ,
838
- captures : Default :: default ( ) ,
839
- offset_of : Default :: default ( ) ,
840
- valtree : Default :: default ( ) ,
817
+ // There are likely to be a lot of types. This should occupy 0.4 MB.
818
+ type_ : InternedSet :: with_capacity ( 16384 ) ,
819
+ const_lists : InternedSet :: with_capacity ( 4096 ) ,
820
+ args : InternedSet :: with_capacity ( 4096 ) ,
821
+ type_lists : InternedSet :: with_capacity ( 4096 ) ,
822
+ region : InternedSet :: with_capacity ( 4096 ) ,
823
+ poly_existential_predicates : InternedSet :: with_capacity ( 1024 ) ,
824
+ canonical_var_infos : InternedSet :: with_capacity ( 1024 ) ,
825
+ predicate : InternedSet :: with_capacity ( 1024 ) ,
826
+ clauses : InternedSet :: with_capacity ( 1024 ) ,
827
+ projs : InternedSet :: with_capacity ( 4096 ) ,
828
+ place_elems : InternedSet :: with_capacity ( 4096 ) ,
829
+ const_ : InternedSet :: with_capacity ( 4096 ) ,
830
+ pat : InternedSet :: with_capacity ( 1024 ) ,
831
+ const_allocation : InternedSet :: with_capacity ( 1024 ) ,
832
+ bound_variable_kinds : InternedSet :: with_capacity ( 1024 ) ,
833
+ layout : InternedSet :: with_capacity ( 1024 ) ,
834
+ adt_def : InternedSet :: with_capacity ( 1024 ) ,
835
+ external_constraints : InternedSet :: with_capacity ( 1024 ) ,
836
+ predefined_opaques_in_body : InternedSet :: with_capacity ( 1024 ) ,
837
+ fields : InternedSet :: with_capacity ( 4096 ) ,
838
+ local_def_ids : InternedSet :: with_capacity ( 1024 ) ,
839
+ captures : InternedSet :: with_capacity ( 1024 ) ,
840
+ offset_of : InternedSet :: with_capacity ( 1024 ) ,
841
+ valtree : InternedSet :: with_capacity ( 1024 ) ,
841
842
}
842
843
}
843
844
0 commit comments