pub fn process_registered_region_obligations(
        &self,
        region_bound_pairs: &[(ty::Region<'tcx>, GenericKind<'tcx>)],
        implicit_region_bound: Option<ty::Region<'tcx>>,
        param_env: ty::ParamEnv<'tcx>,
        body_id: ast::NodeId,
    ) {
        assert!(
            !self.in_snapshot.get(),
            "cannot process registered region obligations in a snapshot"
        );

        debug!("process_registered_region_obligations()");

        // pull out the region obligations with the given `body_id` (leaving the rest)
        let mut my_region_obligations = Vec::with_capacity(self.region_obligations.borrow().len());
        {
            let mut r_o = self.region_obligations.borrow_mut();
            my_region_obligations.extend(
                r_o.drain_filter(|(ro_body_id, _)| *ro_body_id == body_id)
                   .map(|(_, obligation)| obligation)
            );
        }

        let outlives = &mut TypeOutlives::new(
            self,
            self.tcx,
            region_bound_pairs,
            implicit_region_bound,
            param_env,
        );

        for RegionObligation {
            sup_type,
            sub_region,
            cause,
        } in my_region_obligations
        {
            debug!(
                "process_registered_region_obligations: sup_type={:?} sub_region={:?} cause={:?}",
                sup_type, sub_region, cause
            );

            let origin = SubregionOrigin::from_obligation_cause(&cause, || {
                infer::RelateParamBound(cause.span, sup_type)
            });

            let sup_type = self.resolve_type_vars_if_possible(&sup_type);
            outlives.type_must_outlive(origin, sup_type, sub_region);
        }
    }
/// Process the region obligations that must be proven (during
/// `regionck`) for the given `body_id`, given information about
/// the region bounds in scope and so forth. This function must be
/// invoked for all relevant body-ids before region inference is
/// done (or else an assert will fire).
///
/// See the `region_obligations` field of `InferCtxt` for some
/// comments about how this function fits into the overall expected
/// flow of the the inferencer. The key point is that it is
/// invoked after all type-inference variables have been bound --
/// towards the end of regionck. This also ensures that the
/// region-bound-pairs are available (see comments above regarding
/// closures).
///
/// # Parameters
///
/// - `region_bound_pairs`: the set of region bounds implied by
///   the parameters and where-clauses. In particular, each pair
///   `('a, K)` in this list tells us that the bounds in scope
///   indicate that `K: 'a`, where `K` is either a generic
///   parameter like `T` or a projection like `T::Item`.
/// - `implicit_region_bound`: if some, this is a region bound
///   that is considered to hold for all type parameters (the
///   function body).
/// - `param_env` is the parameter environment for the enclosing function.
/// - `body_id` is the body-id whose region obligations are being
///   processed.
///
/// # Returns
///
/// This function may have to perform normalizations, and hence it
/// returns an `InferOk` with subobligations that must be
/// processed.
Process the region obligations that must be proven (during
`regionck`) for the given `body_id`, given information about
the region bounds in scope and so forth. This function must be
invoked for all relevant body-ids before region inference is
done (or else an assert will fire).

See the `region_obligations` field of `InferCtxt` for some
comments about how this function fits into the overall expected
flow of the the inferencer. The key point is that it is
invoked after all type-inference variables have been bound
towards the end of regionck. This also ensures that the
region-bound-pairs are available (see comments above regarding
closures).
Process the region obligations that must be proven ( during ` regionck ` ) for the given ` body_id ` given information about the region bounds in scope and so forth . This function must be invoked for all relevant body - ids before region inference is done ( or else an assert will fire ) . See the ` region_obligations ` field of ` InferCtxt ` for some comments about how this function fits into the overall expected flow of the the inferencer . The key point is that it is invoked after all type - inference variables have been bound towards the end of regionck . This also ensures that the region - bound - pairs are available ( see comments above regarding closures ) .
pub fn process_registered_region_obligations(
        &self,
        region_bound_pairs: &[(ty::Region<'tcx>, GenericKind<'tcx>)],
        implicit_region_bound: Option<ty::Region<'tcx>>,
        param_env: ty::ParamEnv<'tcx>,
        body_id: ast::NodeId,
    ) {
        assert!(
            !self.in_snapshot.get(),
            "cannot process registered region obligations in a snapshot"
        );
        debug!("process_registered_region_obligations()");
        // pull out the region obligations with the given `body_id` (leaving the rest)
        let mut my_region_obligations = Vec::with_capacity(self.region_obligations.borrow().len());
        {
            let mut r_o = self.region_obligations.borrow_mut();
            my_region_obligations.extend(
                r_o.drain_filter(|(ro_body_id, _)| *ro_body_id == body_id)
                   .map(|(_, obligation)| obligation)
            );
        }
        let outlives = &mut TypeOutlives::new(
            self,
            self.tcx,
            region_bound_pairs,
            implicit_region_bound,
            param_env,
        );
        for RegionObligation {
            sup_type,
            sub_region,
            cause,
        } in my_region_obligations
        {
            debug!(
                "process_registered_region_obligations: sup_type={:?} sub_region={:?} cause={:?}",
                sup_type, sub_region, cause
            );
            let origin = SubregionOrigin::from_obligation_cause(&cause, || {
                infer::RelateParamBound(cause.span, sup_type)
            });
            let sup_type = self.resolve_type_vars_if_possible(&sup_type);
            outlives.type_must_outlive(origin, sup_type, sub_region);
        }
    }
pub fn process_registered_region_obligations ( & self , region_bound_pairs : & [ ( ty :: Region < ' tcx > , GenericKind < ' tcx > ) ] , implicit_region_bound : Option < ty :: Region < ' tcx > > , param_env : ty :: ParamEnv < ' tcx > , body_id : ast :: NodeId , ) { assert ! ( self in_snapshot get ( ) " " ) ; debug ! ( " " ) ; // pull out the region obligations with the given `body_id` (leaving the rest) let mut my_region_obligations = Vec :: with_capacity ( self . region_obligations . borrow ( ) . len ( ) ) ; { let mut r_o = self . region_obligations . borrow_mut ( ) ; my_region_obligations . extend ( r_o . drain_filter ( | ( ro_body_id , _ ) | * ro_body_id == body_id ) . map ( | ( _ , obligation ) | obligation ) ) ; } let outlives = & mut TypeOutlives :: new ( self , self . tcx , region_bound_pairs , implicit_region_bound , param_env , ) ; for RegionObligation { sup_type , sub_region , cause , } in my_region_obligations { debug ! ( " " sup_type sub_region cause ) ; let origin = SubregionOrigin :: from_obligation_cause ( & cause , | | { infer :: RelateParamBound ( cause . span , sup_type ) } ) ; let sup_type = self . resolve_type_vars_if_possible ( & sup_type ) ; outlives . type_must_outlive ( origin , sup_type , sub_region ) ; } }
Process the region obligations that must be proven (during
`regionck`) for the given `body_id`, given information about
the region bounds in scope and so forth.
Process the region obligations that must be proven ( during ` regionck ` ) for the given ` body_id ` given information about the region bounds in scope and so forth .
&self
region_bound_pairs
&[(ty::Region<'tcx>, GenericKind<'tcx>)]
implicit_region_bound
Option<ty::Region<'tcx>>
param_env
ty::ParamEnv<'tcx>
body_id
ast::NodeId
This function may have to perform normalizations, and hence it
returns an `InferOk` with subobligations that must be
processed.
This function may have to perform normalizations and hence it returns an ` InferOk ` with subobligations that must be processed .
&self
region_bound_pairs
&[(ty::Region<'tcx>, GenericKind<'tcx>)]
the set of region bounds implied by
the parameters and where-clauses. In particular, each pair
`('a, K)` in this list tells us that the bounds in scope
indicate that `K: 'a`, where `K` is either a generic
parameter like `T` or a projection like `T::Item`.
the set of region bounds implied by the parameters and where - clauses . In particular each pair ` ( ' a K ) ` in this list tells us that the bounds in scope indicate that ` K : ' a ` where ` K ` is either a generic parameter like ` T ` or a projection like ` T :: Item ` .
implicit_region_bound
Option<ty::Region<'tcx>>
if some, this is a region bound
that is considered to hold for all type parameters (the
function body).
if some this is a region bound that is considered to hold for all type parameters ( the function body ) .
param_env
ty::ParamEnv<'tcx>
None
body_id
ast::NodeId
None