Skip to content

Commit 62036e3

Browse files
committed
save-analysis: only index path references once
1 parent 7846dbe commit 62036e3

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

src/librustc_save_analysis/dump_visitor.rs

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1377,15 +1377,6 @@ impl<'l, 'tcx: 'l, 'll, D: Dump +'ll> Visitor<'l> for DumpVisitor<'l, 'tcx, 'll,
13771377
debug!("visit_expr {:?}", ex.node);
13781378
self.process_macro_use(ex.span, ex.id);
13791379
match ex.node {
1380-
ast::ExprKind::Call(ref _f, ref _args) => {
1381-
// Don't need to do anything for function calls,
1382-
// because just walking the callee path does what we want.
1383-
visit::walk_expr(self, ex);
1384-
}
1385-
ast::ExprKind::Path(_, ref path) => {
1386-
self.process_path(ex.id, path, None);
1387-
visit::walk_expr(self, ex);
1388-
}
13891380
ast::ExprKind::Struct(ref path, ref fields, ref base) => {
13901381
let hir_expr = self.save_ctxt.tcx.hir.expect_expr(ex.id);
13911382
let adt = match self.save_ctxt.tables.expr_ty_opt(&hir_expr) {
@@ -1483,6 +1474,8 @@ impl<'l, 'tcx: 'l, 'll, D: Dump +'ll> Visitor<'l> for DumpVisitor<'l, 'tcx, 'll,
14831474
self.visit_expr(element);
14841475
self.nest_tables(count.id, |v| v.visit_expr(count));
14851476
}
1477+
// In particular, we take this branch for call and path expressions,
1478+
// where we'll index the idents involved just by continuing to walk.
14861479
_ => {
14871480
visit::walk_expr(self, ex)
14881481
}

0 commit comments

Comments
 (0)