fn adjust_upvar_borrow_kind_for_mut(&mut self, cmt: &mc::cmt_<'tcx>) {
        debug!("adjust_upvar_borrow_kind_for_mut(cmt={:?})", cmt);

        match cmt.cat.clone() {
            Categorization::Deref(base, mc::Unique) |
            Categorization::Interior(base, _) |
            Categorization::Downcast(base, _) => {
                // Interior or owned data is mutable if base is
                // mutable, so iterate to the base.
                self.adjust_upvar_borrow_kind_for_mut(&base);
            }

            Categorization::Deref(base, mc::BorrowedPtr(..)) => {
                if !self.try_adjust_upvar_deref(cmt, ty::MutBorrow) {
                    // assignment to deref of an `&mut`
                    // borrowed pointer implies that the
                    // pointer itself must be unique, but not
                    // necessarily *mutable*
                    self.adjust_upvar_borrow_kind_for_unique(&base);
                }
            }

            Categorization::Deref(_, mc::UnsafePtr(..)) |
            Categorization::StaticItem |
            Categorization::Rvalue(..) |
            Categorization::Local(_) |
            Categorization::Upvar(..) => {
                return;
            }
        }
    }
/// Indicates that `cmt` is being directly mutated (e.g., assigned
/// to). If cmt contains any by-ref upvars, this implies that
/// those upvars must be borrowed using an `&mut` borrow.
Indicates that `cmt` is being directly mutated . If cmt contains any by-ref upvars, this implies that
those upvars must be borrowed using an `&mut` borrow.
Indicates that ` cmt ` is being directly mutated . If cmt contains any by - ref upvars this implies that those upvars must be borrowed using an ` &mut ` borrow .
fn adjust_upvar_borrow_kind_for_mut(&mut self, cmt: &mc::cmt_<'tcx>) {
        debug!("adjust_upvar_borrow_kind_for_mut(cmt={:?})", cmt);
        match cmt.cat.clone() {
            Categorization::Deref(base, mc::Unique) |
            Categorization::Interior(base, _) |
            Categorization::Downcast(base, _) => {
                // Interior or owned data is mutable if base is
                // mutable, so iterate to the base.
                self.adjust_upvar_borrow_kind_for_mut(&base);
            }
            Categorization::Deref(base, mc::BorrowedPtr(..)) => {
                if !self.try_adjust_upvar_deref(cmt, ty::MutBorrow) {
                    // assignment to deref of an `&mut`
                    // borrowed pointer implies that the
                    // pointer itself must be unique, but not
                    // necessarily *mutable*
                    self.adjust_upvar_borrow_kind_for_unique(&base);
                }
            }
            Categorization::Deref(_, mc::UnsafePtr(..)) |
            Categorization::StaticItem |
            Categorization::Rvalue(..) |
            Categorization::Local(_) |
            Categorization::Upvar(..) => {
                return;
            }
        }
    }
fn adjust_upvar_borrow_kind_for_mut ( & mut self , cmt : & mc :: cmt_ < ' tcx > ) { debug ! ( " " cmt ) ; match cmt . cat . clone ( ) { Categorization :: Deref ( base , mc :: Unique ) | Categorization :: Interior ( base , _ ) | Categorization :: Downcast ( base , _ ) => { // Interior or owned data is mutable if base is // mutable, so iterate to the base. self . adjust_upvar_borrow_kind_for_mut ( & base ) ; } Categorization :: Deref ( base , mc :: BorrowedPtr ( .. ) ) => { if ! self . try_adjust_upvar_deref ( cmt , ty :: MutBorrow ) { // assignment to deref of an `&mut` // borrowed pointer implies that the // pointer itself must be unique, but not // necessarily *mutable* self . adjust_upvar_borrow_kind_for_unique ( & base ) ; } } Categorization :: Deref ( _ , mc :: UnsafePtr ( .. ) ) | Categorization :: StaticItem | Categorization :: Rvalue ( .. ) | Categorization :: Local ( _ ) | Categorization :: Upvar ( .. ) => { return ; } } }
Indicates that `cmt` is being directly mutated (e.g., assigned
to).
Indicates that ` cmt ` is being directly mutated ( e . g . assigned to ) .
&mut self
cmt
&mc::cmt_<'tcx>