Skip to content

Commit c11ab21

Browse files
committed
save-analysis: only index path references once
1 parent 0aeb9c1 commit c11ab21

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
@@ -1375,15 +1375,6 @@ impl<'l, 'tcx: 'l, 'll, D: Dump +'ll> Visitor<'l> for DumpVisitor<'l, 'tcx, 'll,
13751375
debug!("visit_expr {:?}", ex.node);
13761376
self.process_macro_use(ex.span, ex.id);
13771377
match ex.node {
1378-
ast::ExprKind::Call(ref _f, ref _args) => {
1379-
// Don't need to do anything for function calls,
1380-
// because just walking the callee path does what we want.
1381-
visit::walk_expr(self, ex);
1382-
}
1383-
ast::ExprKind::Path(_, ref path) => {
1384-
self.process_path(ex.id, path, None);
1385-
visit::walk_expr(self, ex);
1386-
}
13871378
ast::ExprKind::Struct(ref path, ref fields, ref base) => {
13881379
let hir_expr = self.save_ctxt.tcx.hir.expect_expr(ex.id);
13891380
let adt = match self.save_ctxt.tables.expr_ty_opt(&hir_expr) {
@@ -1481,6 +1472,8 @@ impl<'l, 'tcx: 'l, 'll, D: Dump +'ll> Visitor<'l> for DumpVisitor<'l, 'tcx, 'll,
14811472
self.visit_expr(element);
14821473
self.nest_tables(count.id, |v| v.visit_expr(count));
14831474
}
1475+
// In particular, we take this branch for call and path expressions,
1476+
// where we'll index the idents involved just by continuing to walk.
14841477
_ => {
14851478
visit::walk_expr(self, ex)
14861479
}

0 commit comments

Comments
 (0)