Skip to content

Commit

Permalink
Rename handle_call into infer_id
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed Dec 12, 2024
1 parent 140640a commit 12a12c9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/librustdoc/html/render/span_map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ impl SpanMapVisitor<'_> {
true
}

fn handle_call(&mut self, hir_id: HirId, expr_hir_id: Option<HirId>, span: Span) {
fn infer_id(&mut self, hir_id: HirId, expr_hir_id: Option<HirId>, span: Span) {
let hir = self.tcx.hir();
let body_id = hir.enclosing_body_owner(hir_id);
// FIXME: this is showing error messages for parts of the code that are not
Expand All @@ -197,7 +197,7 @@ impl SpanMapVisitor<'_> {
| PatKind::TupleStruct(qpath, _, _)
| PatKind::Path(qpath) => match qpath {
QPath::TypeRelative(_, path) if matches!(path.res, Res::Err) => {
self.handle_call(path.hir_id, Some(p.hir_id), qpath.span());
self.infer_id(path.hir_id, Some(p.hir_id), qpath.span());
}
QPath::Resolved(_, path) => self.handle_path(path),
_ => {}
Expand Down Expand Up @@ -253,9 +253,9 @@ impl<'tcx> Visitor<'tcx> for SpanMapVisitor<'tcx> {
fn visit_expr(&mut self, expr: &'tcx rustc_hir::Expr<'tcx>) {
match expr.kind {
ExprKind::MethodCall(segment, ..) => {
self.handle_call(segment.hir_id, Some(expr.hir_id), segment.ident.span)
self.infer_id(segment.hir_id, Some(expr.hir_id), segment.ident.span)
}
ExprKind::Call(call, ..) => self.handle_call(call.hir_id, None, call.span),
ExprKind::Call(call, ..) => self.infer_id(call.hir_id, None, call.span),
_ => {
if self.handle_macro(expr.span) {
// We don't want to go deeper into the macro.
Expand Down

0 comments on commit 12a12c9

Please sign in to comment.