@@ -425,6 +425,8 @@ bitflags! {
425425 const IS_SIZED = 1 << 17 ,
426426 const MOVENESS_CACHED = 1 << 18 ,
427427 const MOVES_BY_DEFAULT = 1 << 19 ,
428+ const FREEZENESS_CACHED = 1 << 20 ,
429+ const IS_FREEZE = 1 << 21 ,
428430 }
429431}
430432
@@ -1181,6 +1183,9 @@ pub struct ParameterEnvironment<'tcx> {
11811183
11821184 /// A cache for `type_is_sized`
11831185 pub is_sized_cache : RefCell < FxHashMap < Ty < ' tcx > , bool > > ,
1186+
1187+ /// A cache for `type_is_freeze`
1188+ pub is_freeze_cache : RefCell < FxHashMap < Ty < ' tcx > , bool > > ,
11841189}
11851190
11861191impl < ' a , ' tcx > ParameterEnvironment < ' tcx > {
@@ -1195,6 +1200,7 @@ impl<'a, 'tcx> ParameterEnvironment<'tcx> {
11951200 free_id_outlive : self . free_id_outlive ,
11961201 is_copy_cache : RefCell :: new ( FxHashMap ( ) ) ,
11971202 is_sized_cache : RefCell :: new ( FxHashMap ( ) ) ,
1203+ is_freeze_cache : RefCell :: new ( FxHashMap ( ) ) ,
11981204 }
11991205 }
12001206
@@ -2531,6 +2537,7 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> {
25312537 free_id_outlive : free_id_outlive,
25322538 is_copy_cache : RefCell :: new ( FxHashMap ( ) ) ,
25332539 is_sized_cache : RefCell :: new ( FxHashMap ( ) ) ,
2540+ is_freeze_cache : RefCell :: new ( FxHashMap ( ) ) ,
25342541 }
25352542 }
25362543
@@ -2603,6 +2610,7 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> {
26032610 free_id_outlive : free_id_outlive,
26042611 is_copy_cache : RefCell :: new ( FxHashMap ( ) ) ,
26052612 is_sized_cache : RefCell :: new ( FxHashMap ( ) ) ,
2613+ is_freeze_cache : RefCell :: new ( FxHashMap ( ) ) ,
26062614 } ;
26072615
26082616 let cause = traits:: ObligationCause :: misc ( span, free_id_outlive. node_id ( & self . region_maps ) ) ;
0 commit comments