// When this returns true, it means that the expression *is* a
// method-call (i.e. via the operator-overload).  This true result
// also implies that walk_overloaded_operator already took care of
// recursively processing the input arguments, and thus the caller
// should not do so.
When this returns true, it means that the expression *is* a
method-call .  This true result
also implies that walk_overloaded_operator already took care of
recursively processing the input arguments, and thus the caller
should not do so.
When this returns true it means that the expression * is * a method - call . This true result also implies that walk_overloaded_operator already took care of recursively processing the input arguments and thus the caller should not do so .
fn walk_overloaded_operator(&mut self,
                                expr: &hir::Expr,
                                receiver: &hir::Expr,
                                rhs: Vec<&hir::Expr>,
                                pass_args: PassArgs)
                                -> bool
    {
        if !self.typer.is_method_call(expr.id) {
            return false;
        }
        match pass_args {
            PassArgs::ByValue => {
                self.consume_expr(receiver);
                for &arg in &rhs {
                    self.consume_expr(arg);
                }
                return true;
            },
            PassArgs::ByRef => {},
        }
        self.walk_expr(receiver);
        // Arguments (but not receivers) to overloaded operator
        // methods are implicitly autoref'd which sadly does not use
        // adjustments, so we must hardcode the borrow here.
        let r = ty::ReScope(self.tcx().region_maps.node_extent(expr.id));
        let bk = ty::ImmBorrow;
        for &arg in &rhs {
            self.borrow_expr(arg, r, bk, OverloadedOperator);
        }
        return true;
    }
fn walk_overloaded_operator ( & mut self , expr : & hir :: Expr , receiver : & hir :: Expr , rhs : Vec < & hir :: Expr > , pass_args : PassArgs ) -> bool { if ! self . typer . is_method_call ( expr . id ) { return false ; } match pass_args { PassArgs :: ByValue => { self . consume_expr ( receiver ) ; for & arg in & rhs { self . consume_expr ( arg ) ; } return true ; } , PassArgs :: ByRef => { } , } self . walk_expr ( receiver ) ; // Arguments (but not receivers) to overloaded operator // methods are implicitly autoref'd which sadly does not use // adjustments, so we must hardcode the borrow here. let r = ty :: ReScope ( self . tcx ( ) . region_maps . node_extent ( expr . id ) ) ; let bk = ty :: ImmBorrow ; for & arg in & rhs { self . borrow_expr ( arg , r , bk , OverloadedOperator ) ; } return true ; }
When this returns true, it means that the expression *is* a
method-call (i.e.
When this returns true it means that the expression * is * a method - call ( i . e .
&mut self
expr
&hir::Expr
receiver
&hir::Expr
rhs
Vec<&hir::Expr>
pass_args
PassArgs