File tree Expand file tree Collapse file tree 3 files changed +7
-18
lines changed
compiler/rustc_infer/src/infer Expand file tree Collapse file tree 3 files changed +7
-18
lines changed Original file line number Diff line number Diff line change @@ -171,12 +171,12 @@ impl<'tcx> InferCtxtInner<'tcx> {
171171 undo_log : InferCtxtUndoLogs :: default ( ) ,
172172
173173 projection_cache : Default :: default ( ) ,
174- type_variable_storage : type_variable :: TypeVariableStorage :: new ( ) ,
175- const_unification_storage : ut :: UnificationTableStorage :: new ( ) ,
176- int_unification_storage : ut :: UnificationTableStorage :: new ( ) ,
177- float_unification_storage : ut :: UnificationTableStorage :: new ( ) ,
178- effect_unification_storage : ut :: UnificationTableStorage :: new ( ) ,
179- region_constraint_storage : Some ( RegionConstraintStorage :: new ( ) ) ,
174+ type_variable_storage : Default :: default ( ) ,
175+ const_unification_storage : Default :: default ( ) ,
176+ int_unification_storage : Default :: default ( ) ,
177+ float_unification_storage : Default :: default ( ) ,
178+ effect_unification_storage : Default :: default ( ) ,
179+ region_constraint_storage : Some ( Default :: default ( ) ) ,
180180 region_obligations : vec ! [ ] ,
181181 opaque_type_storage : Default :: default ( ) ,
182182 }
Original file line number Diff line number Diff line change @@ -294,10 +294,6 @@ pub(crate) struct RegionSnapshot {
294294}
295295
296296impl < ' tcx > RegionConstraintStorage < ' tcx > {
297- pub fn new ( ) -> Self {
298- Self :: default ( )
299- }
300-
301297 #[ inline]
302298 pub ( crate ) fn with_log < ' a > (
303299 & ' a mut self ,
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ impl<'tcx> Rollback<sv::UndoLog<ut::Delegate<TyVidEqKey<'tcx>>>> for TypeVariabl
1919 }
2020}
2121
22- #[ derive( Clone ) ]
22+ #[ derive( Clone , Default ) ]
2323pub ( crate ) struct TypeVariableStorage < ' tcx > {
2424 /// The origins of each type variable.
2525 values : IndexVec < TyVid , TypeVariableData > ,
@@ -74,13 +74,6 @@ impl<'tcx> TypeVariableValue<'tcx> {
7474}
7575
7676impl < ' tcx > TypeVariableStorage < ' tcx > {
77- pub ( crate ) fn new ( ) -> TypeVariableStorage < ' tcx > {
78- TypeVariableStorage {
79- values : Default :: default ( ) ,
80- eq_relations : ut:: UnificationTableStorage :: new ( ) ,
81- }
82- }
83-
8477 #[ inline]
8578 pub ( crate ) fn with_log < ' a > (
8679 & ' a mut self ,
You can’t perform that action at this time.
0 commit comments