Use Default
more in InferCtxtInner
.
This commit is contained in:
parent
4df21f2ca0
commit
1dac23f6fe
@ -171,12 +171,12 @@ impl<'tcx> InferCtxtInner<'tcx> {
|
|||||||
undo_log: InferCtxtUndoLogs::default(),
|
undo_log: InferCtxtUndoLogs::default(),
|
||||||
|
|
||||||
projection_cache: Default::default(),
|
projection_cache: Default::default(),
|
||||||
type_variable_storage: type_variable::TypeVariableStorage::new(),
|
type_variable_storage: Default::default(),
|
||||||
const_unification_storage: ut::UnificationTableStorage::new(),
|
const_unification_storage: Default::default(),
|
||||||
int_unification_storage: ut::UnificationTableStorage::new(),
|
int_unification_storage: Default::default(),
|
||||||
float_unification_storage: ut::UnificationTableStorage::new(),
|
float_unification_storage: Default::default(),
|
||||||
effect_unification_storage: ut::UnificationTableStorage::new(),
|
effect_unification_storage: Default::default(),
|
||||||
region_constraint_storage: Some(RegionConstraintStorage::new()),
|
region_constraint_storage: Some(Default::default()),
|
||||||
region_obligations: vec![],
|
region_obligations: vec![],
|
||||||
opaque_type_storage: Default::default(),
|
opaque_type_storage: Default::default(),
|
||||||
}
|
}
|
||||||
|
@ -294,10 +294,6 @@ pub(crate) struct RegionSnapshot {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl<'tcx> RegionConstraintStorage<'tcx> {
|
impl<'tcx> RegionConstraintStorage<'tcx> {
|
||||||
pub fn new() -> Self {
|
|
||||||
Self::default()
|
|
||||||
}
|
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
pub(crate) fn with_log<'a>(
|
pub(crate) fn with_log<'a>(
|
||||||
&'a mut self,
|
&'a mut self,
|
||||||
|
@ -19,7 +19,7 @@ impl<'tcx> Rollback<sv::UndoLog<ut::Delegate<TyVidEqKey<'tcx>>>> for TypeVariabl
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone)]
|
#[derive(Clone, Default)]
|
||||||
pub(crate) struct TypeVariableStorage<'tcx> {
|
pub(crate) struct TypeVariableStorage<'tcx> {
|
||||||
/// The origins of each type variable.
|
/// The origins of each type variable.
|
||||||
values: IndexVec<TyVid, TypeVariableData>,
|
values: IndexVec<TyVid, TypeVariableData>,
|
||||||
@ -74,13 +74,6 @@ impl<'tcx> TypeVariableValue<'tcx> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl<'tcx> TypeVariableStorage<'tcx> {
|
impl<'tcx> TypeVariableStorage<'tcx> {
|
||||||
pub(crate) fn new() -> TypeVariableStorage<'tcx> {
|
|
||||||
TypeVariableStorage {
|
|
||||||
values: Default::default(),
|
|
||||||
eq_relations: ut::UnificationTableStorage::new(),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
pub(crate) fn with_log<'a>(
|
pub(crate) fn with_log<'a>(
|
||||||
&'a mut self,
|
&'a mut self,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user