Skip to content

Commit 4143d40

Browse files
committed
save-analysis: only index path references once
1 parent 5309a3e commit 4143d40

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
@@ -1401,15 +1401,6 @@ impl<'l, 'tcx: 'l, 'll, D: Dump +'ll> Visitor<'l> for DumpVisitor<'l, 'tcx, 'll,
14011401
debug!("visit_expr {:?}", ex.node);
14021402
self.process_macro_use(ex.span, ex.id);
14031403
match ex.node {
1404-
ast::ExprKind::Call(ref _f, ref _args) => {
1405-
// Don't need to do anything for function calls,
1406-
// because just walking the callee path does what we want.
1407-
visit::walk_expr(self, ex);
1408-
}
1409-
ast::ExprKind::Path(_, ref path) => {
1410-
self.process_path(ex.id, path, None);
1411-
visit::walk_expr(self, ex);
1412-
}
14131404
ast::ExprKind::Struct(ref path, ref fields, ref base) => {
14141405
let hir_expr = self.save_ctxt.tcx.hir.expect_expr(ex.id);
14151406
let adt = match self.save_ctxt.tables.expr_ty_opt(&hir_expr) {
@@ -1507,6 +1498,8 @@ impl<'l, 'tcx: 'l, 'll, D: Dump +'ll> Visitor<'l> for DumpVisitor<'l, 'tcx, 'll,
15071498
self.visit_expr(element);
15081499
self.nest_tables(count.id, |v| v.visit_expr(count));
15091500
}
1501+
// In particular, we take this branch for call and path expressions,
1502+
// where we'll index the idents involved just by continuing to walk.
15101503
_ => {
15111504
visit::walk_expr(self, ex)
15121505
}

0 commit comments

Comments
 (0)