pub fn lookup<'a, 'tcx>(fcx: &FnCtxt<'a, 'tcx>,
                        span: Span,
                        method_name: ast::Name,
                        self_ty: ty::Ty<'tcx>,
                        supplied_method_types: Vec<ty::Ty<'tcx>>,
                        call_expr: &'tcx hir::Expr,
                        self_expr: &'tcx hir::Expr)
                        -> Result<ty::MethodCallee<'tcx>, MethodError<'tcx>>
{
    debug!("lookup(method_name={}, self_ty={:?}, call_expr={:?}, self_expr={:?})",
           method_name,
           self_ty,
           call_expr,
           self_expr);

    let mode = probe::Mode::MethodCall;
    let self_ty = fcx.infcx().resolve_type_vars_if_possible(&self_ty);
    let pick = try!(probe::probe(fcx, span, mode, method_name, self_ty, call_expr.id));
    Ok(confirm::confirm(fcx, span, self_expr, call_expr, self_ty, pick, supplied_method_types))
}
/// Performs method lookup. If lookup is successful, it will return the callee and store an
/// appropriate adjustment for the self-expr. In some cases it may report an error (e.g., invoking
/// the `drop` method).
///
/// # Arguments
///
/// Given a method call like `foo.bar::<T1,...Tn>(...)`:
///
/// * `fcx`:                   the surrounding `FnCtxt` (!)
/// * `span`:                  the span for the method call
/// * `method_name`:           the name of the method being called (`bar`)
/// * `self_ty`:               the (unadjusted) type of the self expression (`foo`)
/// * `supplied_method_types`: the explicit method type parameters, if any (`T1..Tn`)
/// * `self_expr`:             the self expression (`foo`)
Performs method lookup. If lookup is successful, it will return the callee and store an
appropriate adjustment for the self-expr. In some cases it may report an error .
Performs method lookup . If lookup is successful it will return the callee and store an appropriate adjustment for the self - expr . In some cases it may report an error .
pub fn lookup<'a, 'tcx>(fcx: &FnCtxt<'a, 'tcx>,
                        span: Span,
                        method_name: ast::Name,
                        self_ty: ty::Ty<'tcx>,
                        supplied_method_types: Vec<ty::Ty<'tcx>>,
                        call_expr: &'tcx hir::Expr,
                        self_expr: &'tcx hir::Expr)
                        -> Result<ty::MethodCallee<'tcx>, MethodError<'tcx>>
{
    debug!("lookup(method_name={}, self_ty={:?}, call_expr={:?}, self_expr={:?})",
           method_name,
           self_ty,
           call_expr,
           self_expr);
    let mode = probe::Mode::MethodCall;
    let self_ty = fcx.infcx().resolve_type_vars_if_possible(&self_ty);
    let pick = try!(probe::probe(fcx, span, mode, method_name, self_ty, call_expr.id));
    Ok(confirm::confirm(fcx, span, self_expr, call_expr, self_ty, pick, supplied_method_types))
}
pub fn lookup < ' a , ' tcx > ( fcx : & FnCtxt < ' a , ' tcx > , span : Span , method_name : ast :: Name , self_ty : ty :: Ty < ' tcx > , supplied_method_types : Vec < ty :: Ty < ' tcx > > , call_expr : & ' tcx hir :: Expr , self_expr : & ' tcx hir :: Expr ) -> Result < ty :: MethodCallee < ' tcx > , MethodError < ' tcx > > { debug ! ( " " method_name self_ty call_expr self_expr ) ; let mode = probe :: Mode :: MethodCall ; let self_ty = fcx . infcx ( ) . resolve_type_vars_if_possible ( & self_ty ) ; let pick = try ! ( probe probe ( fcx span mode method_name self_ty call_expr id ) ) ; Ok ( confirm :: confirm ( fcx , span , self_expr , call_expr , self_ty , pick , supplied_method_types ) ) }
Performs method lookup.
Performs method lookup .
fcx
&FnCtxt<'a, 'tcx>
span
Span
method_name
ast::Name
self_ty
ty::Ty<'tcx>
supplied_method_types
Vec<ty::Ty<'tcx>>
call_expr
&'tcx hir::Expr
self_expr
&'tcx hir::Expr
fcx
&FnCtxt<'a, 'tcx>
span
Span
method_name
ast::Name
self_ty
ty::Ty<'tcx>
supplied_method_types
Vec<ty::Ty<'tcx>>
call_expr
&'tcx hir::Expr
self_expr
&'tcx hir::Expr