Skip to content

Commit 9b31784

Browse files
committed
save-analysis: only index path references once
1 parent b04ebef commit 9b31784

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

src/librustc_save_analysis/dump_visitor.rs

+2-9
Original file line numberDiff line numberDiff line change
@@ -1363,15 +1363,6 @@ impl<'l, 'tcx: 'l, 'll, D: Dump +'ll> Visitor<'l> for DumpVisitor<'l, 'tcx, 'll,
13631363
debug!("visit_expr {:?}", ex.node);
13641364
self.process_macro_use(ex.span, ex.id);
13651365
match ex.node {
1366-
ast::ExprKind::Call(ref _f, ref _args) => {
1367-
// Don't need to do anything for function calls,
1368-
// because just walking the callee path does what we want.
1369-
visit::walk_expr(self, ex);
1370-
}
1371-
ast::ExprKind::Path(_, ref path) => {
1372-
self.process_path(ex.id, path, None);
1373-
visit::walk_expr(self, ex);
1374-
}
13751366
ast::ExprKind::Struct(ref path, ref fields, ref base) => {
13761367
let hir_expr = self.save_ctxt.tcx.hir.expect_expr(ex.id);
13771368
let adt = match self.save_ctxt.tables.expr_ty_opt(&hir_expr) {
@@ -1469,6 +1460,8 @@ impl<'l, 'tcx: 'l, 'll, D: Dump +'ll> Visitor<'l> for DumpVisitor<'l, 'tcx, 'll,
14691460
self.visit_expr(element);
14701461
self.nest_tables(count.id, |v| v.visit_expr(count));
14711462
}
1463+
// In particular, we take this branch for call and path expressions,
1464+
// where we'll index the idents involved just by continuing to walk.
14721465
_ => {
14731466
visit::walk_expr(self, ex)
14741467
}

0 commit comments

Comments
 (0)