Eager,
}
-pub struct TypeRelating<'me, 'gcx: 'tcx, 'tcx: 'me, D>
+pub struct TypeRelating<'me, 'tcx, D>
where
D: TypeRelatingDelegate<'tcx>,
{
- infcx: &'me InferCtxt<'me, 'gcx, 'tcx>,
+ infcx: &'me InferCtxt<'me, 'tcx>,
/// Callback to use when we deduce an outlives relationship
delegate: D,
#[derive(Copy, Clone)]
struct UniversallyQuantified(bool);
-impl<'me, 'gcx, 'tcx, D> TypeRelating<'me, 'gcx, 'tcx, D>
+impl<'me, 'tcx, D> TypeRelating<'me, 'tcx, D>
where
D: TypeRelatingDelegate<'tcx>,
{
pub fn new(
- infcx: &'me InferCtxt<'me, 'gcx, 'tcx>,
+ infcx: &'me InferCtxt<'me, 'tcx>,
delegate: D,
ambient_variance: ty::Variance,
) -> Self {
/// for more details on why we want them.
fn vid_scopes<D: TypeRelatingDelegate<'tcx>>(
&self,
- relate: &'r mut TypeRelating<'_, '_, 'tcx, D>,
+ relate: &'r mut TypeRelating<'_, 'tcx, D>,
) -> &'r mut Vec<BoundRegionScope<'tcx>>;
/// Given a generalized type G that should replace the vid, relate
/// appeared.
fn relate_generalized_ty<D>(
&self,
- relate: &mut TypeRelating<'_, '_, 'tcx, D>,
+ relate: &mut TypeRelating<'_, 'tcx, D>,
generalized_ty: Ty<'tcx>,
) -> RelateResult<'tcx, Ty<'tcx>>
where
fn vid_scopes<D>(
&self,
- relate: &'r mut TypeRelating<'_, '_, 'tcx, D>,
+ relate: &'r mut TypeRelating<'_, 'tcx, D>,
) -> &'r mut Vec<BoundRegionScope<'tcx>>
where
D: TypeRelatingDelegate<'tcx>,
fn relate_generalized_ty<D>(
&self,
- relate: &mut TypeRelating<'_, '_, 'tcx, D>,
+ relate: &mut TypeRelating<'_, 'tcx, D>,
generalized_ty: Ty<'tcx>,
) -> RelateResult<'tcx, Ty<'tcx>>
where
fn vid_scopes<D>(
&self,
- relate: &'r mut TypeRelating<'_, '_, 'tcx, D>,
+ relate: &'r mut TypeRelating<'_, 'tcx, D>,
) -> &'r mut Vec<BoundRegionScope<'tcx>>
where
D: TypeRelatingDelegate<'tcx>,
fn relate_generalized_ty<D>(
&self,
- relate: &mut TypeRelating<'_, '_, 'tcx, D>,
+ relate: &mut TypeRelating<'_, 'tcx, D>,
generalized_ty: Ty<'tcx>,
) -> RelateResult<'tcx, Ty<'tcx>>
where
}
}
-impl<D> TypeRelation<'gcx, 'tcx> for TypeRelating<'me, 'gcx, 'tcx, D>
+impl<D> TypeRelation<'tcx> for TypeRelating<'me, 'tcx, D>
where
D: TypeRelatingDelegate<'tcx>,
{
- fn tcx(&self) -> TyCtxt<'gcx, 'tcx> {
+ fn tcx(&self) -> TyCtxt<'tcx> {
self.infcx.tcx
}
/// binder depth, and finds late-bound regions targeting the
/// `for<..`>. For each of those, it creates an entry in
/// `bound_region_scope`.
-struct ScopeInstantiator<'me, 'tcx: 'me> {
+struct ScopeInstantiator<'me, 'tcx> {
next_region: &'me mut dyn FnMut(ty::BoundRegion) -> ty::Region<'tcx>,
// The debruijn index of the scope we are instantiating.
target_index: ty::DebruijnIndex,
/// scopes.
///
/// [blog post]: https://is.gd/0hKvIr
-struct TypeGeneralizer<'me, 'gcx: 'tcx, 'tcx: 'me, D>
+struct TypeGeneralizer<'me, 'tcx, D>
where
- D: TypeRelatingDelegate<'tcx> + 'me,
+ D: TypeRelatingDelegate<'tcx>,
{
- infcx: &'me InferCtxt<'me, 'gcx, 'tcx>,
+ infcx: &'me InferCtxt<'me, 'tcx>,
delegate: &'me mut D,
universe: ty::UniverseIndex,
}
-impl<D> TypeRelation<'gcx, 'tcx> for TypeGeneralizer<'me, 'gcx, 'tcx, D>
+impl<D> TypeRelation<'tcx> for TypeGeneralizer<'me, 'tcx, D>
where
D: TypeRelatingDelegate<'tcx>,
{
- fn tcx(&self) -> TyCtxt<'gcx, 'tcx> {
+ fn tcx(&self) -> TyCtxt<'tcx> {
self.infcx.tcx
}