fn query_region_constraints_into_obligations<'a>(
        &'a self,
        cause: &'a ObligationCause<'tcx>,
        param_env: ty::ParamEnv<'tcx>,
        unsubstituted_region_constraints: &'a [QueryRegionConstraint<'tcx>],
        result_subst: &'a CanonicalVarValues<'tcx>,
    ) -> impl Iterator<Item = PredicateObligation<'tcx>> + 'a {
        Box::new(
            unsubstituted_region_constraints
                .iter()
                .map(move |constraint| {
                    let ty::OutlivesPredicate(k1, r2) = constraint.skip_binder(); // restored below
                    let k1 = substitute_value(self.tcx, result_subst, k1);
                    let r2 = substitute_value(self.tcx, result_subst, r2);
                    match k1.unpack() {
                        UnpackedKind::Lifetime(r1) => Obligation::new(
                            cause.clone(),
                            param_env,
                            ty::Predicate::RegionOutlives(ty::Binder::dummy(
                                ty::OutlivesPredicate(r1, r2),
                            )),
                        ),

                        UnpackedKind::Type(t1) => Obligation::new(
                            cause.clone(),
                            param_env,
                            ty::Predicate::TypeOutlives(ty::Binder::dummy(ty::OutlivesPredicate(
                                t1, r2,
                            ))),
                        ),
                    }
                }),
        ) as Box<dyn Iterator<Item = _>>
    }
/// Converts the region constraints resulting from a query into an
/// iterator of obligations.
Converts the region constraints resulting from a query into an
iterator of obligations.
Converts the region constraints resulting from a query into an iterator of obligations .
fn query_region_constraints_into_obligations<'a>(
        &'a self,
        cause: &'a ObligationCause<'tcx>,
        param_env: ty::ParamEnv<'tcx>,
        unsubstituted_region_constraints: &'a [QueryRegionConstraint<'tcx>],
        result_subst: &'a CanonicalVarValues<'tcx>,
    ) -> impl Iterator<Item = PredicateObligation<'tcx>> + 'a {
        Box::new(
            unsubstituted_region_constraints
                .iter()
                .map(move |constraint| {
                    let ty::OutlivesPredicate(k1, r2) = constraint.skip_binder(); // restored below
                    let k1 = substitute_value(self.tcx, result_subst, k1);
                    let r2 = substitute_value(self.tcx, result_subst, r2);
                    match k1.unpack() {
                        UnpackedKind::Lifetime(r1) => Obligation::new(
                            cause.clone(),
                            param_env,
                            ty::Predicate::RegionOutlives(ty::Binder::dummy(
                                ty::OutlivesPredicate(r1, r2),
                            )),
                        ),
                        UnpackedKind::Type(t1) => Obligation::new(
                            cause.clone(),
                            param_env,
                            ty::Predicate::TypeOutlives(ty::Binder::dummy(ty::OutlivesPredicate(
                                t1, r2,
                            ))),
                        ),
                    }
                }),
        ) as Box<dyn Iterator<Item = _>>
    }
fn query_region_constraints_into_obligations < ' a > ( & ' a self , cause : & ' a ObligationCause < ' tcx > , param_env : ty :: ParamEnv < ' tcx > , unsubstituted_region_constraints : & ' a [ QueryRegionConstraint < ' tcx > ] , result_subst : & ' a CanonicalVarValues < ' tcx > , ) -> impl Iterator < Item = PredicateObligation < ' tcx > > + ' a { Box :: new ( unsubstituted_region_constraints . iter ( ) . map ( move | constraint | { let ty :: OutlivesPredicate ( k1 , r2 ) = constraint . skip_binder ( ) ; // restored below let k1 = substitute_value ( self . tcx , result_subst , k1 ) ; let r2 = substitute_value ( self . tcx , result_subst , r2 ) ; match k1 . unpack ( ) { UnpackedKind :: Lifetime ( r1 ) => Obligation :: new ( cause . clone ( ) , param_env , ty :: Predicate :: RegionOutlives ( ty :: Binder :: dummy ( ty :: OutlivesPredicate ( r1 , r2 ) , ) ) , ) , UnpackedKind :: Type ( t1 ) => Obligation :: new ( cause . clone ( ) , param_env , ty :: Predicate :: TypeOutlives ( ty :: Binder :: dummy ( ty :: OutlivesPredicate ( t1 , r2 , ) ) ) , ) , } } ) , ) as Box < dyn Iterator < Item = _ > > }
Converts the region constraints resulting from a query into an
iterator of obligations.
Converts the region constraints resulting from a query into an iterator of obligations .
&'a self
cause
&'a ObligationCause<'tcx>
param_env
ty::ParamEnv<'tcx>
unsubstituted_region_constraints
&'a [QueryRegionConstraint<'tcx>]
result_subst
&'a CanonicalVarValues<'tcx>