@@ -170,7 +170,7 @@ impl SpanMapVisitor<'_> {
170170 true
171171 }
172172
173- fn handle_call ( & mut self , hir_id : HirId , expr_hir_id : Option < HirId > , span : Span ) {
173+ fn infer_id ( & mut self , hir_id : HirId , expr_hir_id : Option < HirId > , span : Span ) {
174174 let hir = self . tcx . hir ( ) ;
175175 let body_id = hir. enclosing_body_owner ( hir_id) ;
176176 // FIXME: this is showing error messages for parts of the code that are not
@@ -197,7 +197,7 @@ impl SpanMapVisitor<'_> {
197197 | PatKind :: TupleStruct ( qpath, _, _)
198198 | PatKind :: Path ( qpath) => match qpath {
199199 QPath :: TypeRelative ( _, path) if matches ! ( path. res, Res :: Err ) => {
200- self . handle_call ( path. hir_id , Some ( p. hir_id ) , qpath. span ( ) ) ;
200+ self . infer_id ( path. hir_id , Some ( p. hir_id ) , qpath. span ( ) ) ;
201201 }
202202 QPath :: Resolved ( _, path) => self . handle_path ( path) ,
203203 _ => { }
@@ -253,9 +253,9 @@ impl<'tcx> Visitor<'tcx> for SpanMapVisitor<'tcx> {
253253 fn visit_expr ( & mut self , expr : & ' tcx rustc_hir:: Expr < ' tcx > ) {
254254 match expr. kind {
255255 ExprKind :: MethodCall ( segment, ..) => {
256- self . handle_call ( segment. hir_id , Some ( expr. hir_id ) , segment. ident . span )
256+ self . infer_id ( segment. hir_id , Some ( expr. hir_id ) , segment. ident . span )
257257 }
258- ExprKind :: Call ( call, ..) => self . handle_call ( call. hir_id , None , call. span ) ,
258+ ExprKind :: Call ( call, ..) => self . infer_id ( call. hir_id , None , call. span ) ,
259259 _ => {
260260 if self . handle_macro ( expr. span ) {
261261 // We don't want to go deeper into the macro.
0 commit comments