Skip to content

Commit

Permalink
save-analysis: Nest tables when processing impl items
Browse files Browse the repository at this point in the history
  • Loading branch information
Xanewok committed Oct 17, 2019
1 parent ea45150 commit 5fe88ab
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions src/librustc_save_analysis/dump_visitor.rs
Expand Up @@ -669,15 +669,18 @@ impl<'l, 'tcx> DumpVisitor<'l, 'tcx> {
}
}
}
self.visit_ty(&typ);
if let &Some(ref trait_ref) = trait_ref {
self.process_path(trait_ref.ref_id, &trait_ref.path);
}
self.process_generic_params(generics, "", item.id);
for impl_item in impl_items {
let map = &self.tcx.hir();
self.process_impl_item(impl_item, map.local_def_id_from_node_id(item.id));
}

let map = &self.tcx.hir();
self.nest_tables(item.id, |v| {
v.visit_ty(&typ);
if let &Some(ref trait_ref) = trait_ref {
v.process_path(trait_ref.ref_id, &trait_ref.path);
}
v.process_generic_params(generics, "", item.id);
for impl_item in impl_items {
v.process_impl_item(impl_item, map.local_def_id_from_node_id(item.id));
}
});
}

fn process_trait(
Expand Down

0 comments on commit 5fe88ab

Please sign in to comment.