Function rustc_trans::middle::typeck::check::method::lookup_in_trait_adjustedExperimental
[-]
[+]
[src]
pub fn lookup_in_trait_adjusted(fcx: &'a FnCtxt<'a, 'tcx>, span: Span, self_expr: Option<&'a Expr>, m_name: Name, trait_def_id: DefId, autoderefref: AutoDerefRef<'tcx>, self_ty: &'tcx TyS<'tcx>, opt_input_types: Option<Vec<&'tcx TyS<'tcx>>>) -> Option<MethodCallee<'tcx>>
lookup_in_trait_adjusted is used for overloaded operators. It
does a very narrow slice of what the normal probe/confirm path
does. In particular, it doesn't really do any probing: it
simply constructs an obligation for a particular trait with the
given self-type and checks whether that trait is implemented.
FIXME(#18741) -- It seems likely that we can consolidate some of this code with the other method-lookup code. In particular, autoderef on index is basically identical to autoderef with normal probes, except that the test also looks for built-in indexing. Also, the second half of this method is basically the same as confirmation.