// Invoke the appropriate delegate calls for anything that gets
// consumed or borrowed as part of the automatic adjustment
// process.
Invoke the appropriate delegate calls for anything that gets
consumed or borrowed as part of the automatic adjustment
process.
Invoke the appropriate delegate calls for anything that gets consumed or borrowed as part of the automatic adjustment process .
fn walk_adjustment(&mut self, expr: &hir::Expr) {
        let typer = self.typer;
        //NOTE(@jroesch): mixed RefCell borrow causes crash
        let adj = typer.adjustments().get(&expr.id).map(|x| x.clone());
        if let Some(adjustment) = adj {
            match adjustment {
                ty::AdjustReifyFnPointer |
                ty::AdjustUnsafeFnPointer => {
                    // Creating a closure/fn-pointer or unsizing consumes
                    // the input and stores it into the resulting rvalue.
                    debug!("walk_adjustment(AdjustReifyFnPointer|AdjustUnsafeFnPointer)");
                    let cmt_unadjusted =
                        return_if_err!(self.mc.cat_expr_unadjusted(expr));
                    self.delegate_consume(expr.id, expr.span, cmt_unadjusted);
                }
                ty::AdjustDerefRef(ref adj) => {
                    self.walk_autoderefref(expr, adj);
                }
            }
        }
    }
fn walk_adjustment ( & mut self , expr : & hir :: Expr ) { let typer = self . typer ; //NOTE(@jroesch): mixed RefCell borrow causes crash let adj = typer . adjustments ( ) . get ( & expr . id ) . map ( | x | x . clone ( ) ) ; if let Some ( adjustment ) = adj { match adjustment { ty :: AdjustReifyFnPointer | ty :: AdjustUnsafeFnPointer => { // Creating a closure/fn-pointer or unsizing consumes // the input and stores it into the resulting rvalue. debug ! ( " " ) ; let cmt_unadjusted = return_if_err ! ( self mc cat_expr_unadjusted ( expr ) ) ; self . delegate_consume ( expr . id , expr . span , cmt_unadjusted ) ; } ty :: AdjustDerefRef ( ref adj ) => { self . walk_autoderefref ( expr , adj ) ; } } } }
Invoke the appropriate delegate calls for anything that gets
consumed or borrowed as part of the automatic adjustment
process.
Invoke the appropriate delegate calls for anything that gets consumed or borrowed as part of the automatic adjustment process .
&mut self
expr
&hir::Expr