fn cat_upvar(&self, hir_id: hir::HirId, var_id: hir::HirId) -> McResult<PlaceWithHirId<'tcx>> {
        let closure_expr_def_id = self.body_owner;

        let upvar_id = ty::UpvarId {
            var_path: ty::UpvarPath { hir_id: var_id },
            closure_expr_id: closure_expr_def_id,
        };
        let var_ty = self.node_ty(var_id)?;

        let ret = PlaceWithHirId::new(hir_id, var_ty, PlaceBase::Upvar(upvar_id), Vec::new());

        debug!("cat_upvar ret={:?}", ret);
        Ok(ret)
    }
/// Categorize an upvar.
///
/// Note: the actual upvar access contains invisible derefs of closure
/// environment and upvar reference as appropriate. Only regionck cares
/// about these dereferences, so we let it compute them as needed.
Categorize an upvar.
Note: the actual upvar access contains invisible derefs of closure
environment and upvar reference as appropriate. Only regionck cares
about these dereferences, so we let it compute them as needed.
Categorize an upvar . Note : the actual upvar access contains invisible derefs of closure environment and upvar reference as appropriate . Only regionck cares about these dereferences so we let it compute them as needed .
fn cat_upvar(&self, hir_id: hir::HirId, var_id: hir::HirId) -> McResult<PlaceWithHirId<'tcx>> {
        let closure_expr_def_id = self.body_owner;
        let upvar_id = ty::UpvarId {
            var_path: ty::UpvarPath { hir_id: var_id },
            closure_expr_id: closure_expr_def_id,
        };
        let var_ty = self.node_ty(var_id)?;
        let ret = PlaceWithHirId::new(hir_id, var_ty, PlaceBase::Upvar(upvar_id), Vec::new());
        debug!("cat_upvar ret={:?}", ret);
        Ok(ret)
    }
fn cat_upvar ( & self , hir_id : hir :: HirId , var_id : hir :: HirId ) -> McResult < PlaceWithHirId < ' tcx > > { let closure_expr_def_id = self . body_owner ; let upvar_id = ty :: UpvarId { var_path : ty :: UpvarPath { hir_id : var_id } , closure_expr_id : closure_expr_def_id , } ; let var_ty = self . node_ty ( var_id ) ? ; let ret = PlaceWithHirId :: new ( hir_id , var_ty , PlaceBase :: Upvar ( upvar_id ) , Vec :: new ( ) ) ; debug ! ( " " ret ) ; Ok ( ret ) }
Categorize an upvar.
Categorize an upvar .
&self
hir_id
hir::HirId
var_id
hir::HirId
&self
hir_id
hir::HirId
var_id
hir::HirId