@@ -170,7 +170,7 @@ impl SpanMapVisitor<'_> {
170
170
true
171
171
}
172
172
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 ) {
174
174
let hir = self . tcx . hir ( ) ;
175
175
let body_id = hir. enclosing_body_owner ( hir_id) ;
176
176
// FIXME: this is showing error messages for parts of the code that are not
@@ -197,7 +197,7 @@ impl SpanMapVisitor<'_> {
197
197
| PatKind :: TupleStruct ( qpath, _, _)
198
198
| PatKind :: Path ( qpath) => match qpath {
199
199
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 ( ) ) ;
201
201
}
202
202
QPath :: Resolved ( _, path) => self . handle_path ( path) ,
203
203
_ => { }
@@ -253,9 +253,9 @@ impl<'tcx> Visitor<'tcx> for SpanMapVisitor<'tcx> {
253
253
fn visit_expr ( & mut self , expr : & ' tcx rustc_hir:: Expr < ' tcx > ) {
254
254
match expr. kind {
255
255
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 )
257
257
}
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 ) ,
259
259
_ => {
260
260
if self . handle_macro ( expr. span ) {
261
261
// We don't want to go deeper into the macro.
0 commit comments