File tree 3 files changed +7
-18
lines changed
compiler/rustc_infer/src/infer
3 files changed +7
-18
lines changed Original file line number Diff line number Diff line change @@ -172,12 +172,12 @@ impl<'tcx> InferCtxtInner<'tcx> {
172
172
undo_log : InferCtxtUndoLogs :: default ( ) ,
173
173
174
174
projection_cache : Default :: default ( ) ,
175
- type_variable_storage : type_variable :: TypeVariableStorage :: new ( ) ,
176
- const_unification_storage : ut :: UnificationTableStorage :: new ( ) ,
177
- int_unification_storage : ut :: UnificationTableStorage :: new ( ) ,
178
- float_unification_storage : ut :: UnificationTableStorage :: new ( ) ,
179
- effect_unification_storage : ut :: UnificationTableStorage :: new ( ) ,
180
- region_constraint_storage : Some ( RegionConstraintStorage :: new ( ) ) ,
175
+ type_variable_storage : Default :: default ( ) ,
176
+ const_unification_storage : Default :: default ( ) ,
177
+ int_unification_storage : Default :: default ( ) ,
178
+ float_unification_storage : Default :: default ( ) ,
179
+ effect_unification_storage : Default :: default ( ) ,
180
+ region_constraint_storage : Some ( Default :: default ( ) ) ,
181
181
region_obligations : vec ! [ ] ,
182
182
opaque_type_storage : Default :: default ( ) ,
183
183
}
Original file line number Diff line number Diff line change @@ -294,10 +294,6 @@ pub(crate) struct RegionSnapshot {
294
294
}
295
295
296
296
impl < ' tcx > RegionConstraintStorage < ' tcx > {
297
- pub fn new ( ) -> Self {
298
- Self :: default ( )
299
- }
300
-
301
297
#[ inline]
302
298
pub ( crate ) fn with_log < ' a > (
303
299
& ' 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
19
19
}
20
20
}
21
21
22
- #[ derive( Clone ) ]
22
+ #[ derive( Clone , Default ) ]
23
23
pub ( crate ) struct TypeVariableStorage < ' tcx > {
24
24
/// The origins of each type variable.
25
25
values : IndexVec < TyVid , TypeVariableData > ,
@@ -74,13 +74,6 @@ impl<'tcx> TypeVariableValue<'tcx> {
74
74
}
75
75
76
76
impl < ' 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
-
84
77
#[ inline]
85
78
pub ( crate ) fn with_log < ' a > (
86
79
& ' a mut self ,
You can’t perform that action at this time.
0 commit comments