@@ -174,14 +174,15 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
174174 ///
175175 /// # Arguments
176176 ///
177- /// Given a method call like `foo.bar::<T1,...Tn>(...)`:
177+ /// Given a method call like `foo.bar::<T1,...Tn>(a, b + 1, ...)`:
178178 ///
179179 /// * `self`: the surrounding `FnCtxt` (!)
180180 /// * `self_ty`: the (unadjusted) type of the self expression (`foo`)
181181 /// * `segment`: the name and generic arguments of the method (`bar::<T1, ...Tn>`)
182182 /// * `span`: the span for the method call
183183 /// * `call_expr`: the complete method call: (`foo.bar::<T1,...Tn>(...)`)
184184 /// * `self_expr`: the self expression (`foo`)
185+ /// * `args`: the expressions of the arguments (`a, b + 1, ...`)
185186 #[ instrument( level = "debug" , skip( self , call_expr, self_expr) ) ]
186187 pub fn lookup_method (
187188 & self ,
@@ -190,6 +191,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
190191 span : Span ,
191192 call_expr : & ' tcx hir:: Expr < ' tcx > ,
192193 self_expr : & ' tcx hir:: Expr < ' tcx > ,
194+ args : & ' tcx [ hir:: Expr < ' tcx > ] ,
193195 ) -> Result < MethodCallee < ' tcx > , MethodError < ' tcx > > {
194196 debug ! (
195197 "lookup(method_name={}, self_ty={:?}, call_expr={:?}, self_expr={:?})" ,
@@ -199,7 +201,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
199201 let pick =
200202 self . lookup_probe ( span, segment. ident , self_ty, call_expr, ProbeScope :: TraitsInScope ) ?;
201203
202- self . lint_dot_call_from_2018 ( self_ty, segment, span, call_expr, self_expr, & pick) ;
204+ self . lint_dot_call_from_2018 ( self_ty, segment, span, call_expr, self_expr, & pick, args ) ;
203205
204206 for import_id in & pick. import_ids {
205207 debug ! ( "used_trait_import: {:?}" , import_id) ;
0 commit comments