pub fn early_free_extent<'a, 'gcx>(&self, tcx: TyCtxt<'a, 'gcx, 'tcx>,
                                       br: &ty::EarlyBoundRegion)
                                       -> CodeExtent {
        let param_owner = tcx.parent_def_id(br.def_id).unwrap();

        let param_owner_id = tcx.hir.as_local_node_id(param_owner).unwrap();
        let body_id = tcx.hir.maybe_body_owned_by(param_owner_id).unwrap_or_else(|| {
            // The lifetime was defined on node that doesn't own a body,
            // which in practice can only mean a trait or an impl, that
            // is the parent of a method, and that is enforced below.
            assert_eq!(Some(param_owner_id), self.root_parent,
                       "free_extent: {:?} not recognized by the region maps for {:?}",
                       param_owner,
                       self.root_body.map(|body| tcx.hir.body_owner_def_id(body)));

            // The trait/impl lifetime is in scope for the method's body.
            self.root_body.unwrap()
        });

        CodeExtent::CallSiteScope(body_id)
    }
/// Assuming that the provided region was defined within this `RegionMaps`,
/// returns the outermost `CodeExtent` that the region outlives.
Assuming that the provided region was defined within this `RegionMaps`,
returns the outermost `CodeExtent` that the region outlives.
Assuming that the provided region was defined within this ` RegionMaps ` returns the outermost ` CodeExtent ` that the region outlives .
pub fn early_free_extent<'a, 'gcx>(&self, tcx: TyCtxt<'a, 'gcx, 'tcx>,
                                       br: &ty::EarlyBoundRegion)
                                       -> CodeExtent {
        let param_owner = tcx.parent_def_id(br.def_id).unwrap();
        let param_owner_id = tcx.hir.as_local_node_id(param_owner).unwrap();
        let body_id = tcx.hir.maybe_body_owned_by(param_owner_id).unwrap_or_else(|| {
            // The lifetime was defined on node that doesn't own a body,
            // which in practice can only mean a trait or an impl, that
            // is the parent of a method, and that is enforced below.
            assert_eq!(Some(param_owner_id), self.root_parent,
                       "free_extent: {:?} not recognized by the region maps for {:?}",
                       param_owner,
                       self.root_body.map(|body| tcx.hir.body_owner_def_id(body)));
            // The trait/impl lifetime is in scope for the method's body.
            self.root_body.unwrap()
        });
        CodeExtent::CallSiteScope(body_id)
    }
pub fn early_free_extent < ' a , ' gcx > ( & self , tcx : TyCtxt < ' a , ' gcx , ' tcx > , br : & ty :: EarlyBoundRegion ) -> CodeExtent { let param_owner = tcx . parent_def_id ( br . def_id ) . unwrap ( ) ; let param_owner_id = tcx . hir . as_local_node_id ( param_owner ) . unwrap ( ) ; let body_id = tcx . hir . maybe_body_owned_by ( param_owner_id ) . unwrap_or_else ( | | { // The lifetime was defined on node that doesn't own a body, // which in practice can only mean a trait or an impl, that // is the parent of a method, and that is enforced below. assert_eq ! ( Some ( param_owner_id ) self root_parent " " param_owner self root_body map ( body tcx hir body_owner_def_id ( body ) ) ) ; // The trait/impl lifetime is in scope for the method's body. self . root_body . unwrap ( ) } ) ; CodeExtent :: CallSiteScope ( body_id ) }
Assuming that the provided region was defined within this `RegionMaps`,
returns the outermost `CodeExtent` that the region outlives.
Assuming that the provided region was defined within this ` RegionMaps ` returns the outermost ` CodeExtent ` that the region outlives .
&self
tcx
TyCtxt<'a, 'gcx, 'tcx>
br
&ty::EarlyBoundRegion
&self
tcx
TyCtxt<'a, 'gcx, 'tcx>
br
&ty::EarlyBoundRegion