1
Fork 0

rustc_hir: Change representation of import paths to support multiple resolutions

This commit is contained in:
Vadim Petrochenkov 2022-11-25 17:39:38 +03:00
parent 6cd4dd3091
commit 1f259ae679
19 changed files with 136 additions and 114 deletions

View file

@ -369,7 +369,7 @@ impl<'v> hir_visit::Visitor<'v> for StatCollector<'v> {
hir_visit::walk_fn(self, fk, fd, b, id)
}
fn visit_use(&mut self, p: &'v hir::Path<'v>, hir_id: hir::HirId) {
fn visit_use(&mut self, p: &'v hir::UsePath<'v>, hir_id: hir::HirId) {
// This is `visit_use`, but the type is `Path` so record it that way.
self.record("Path", Id::None, p);
hir_visit::walk_use(self, p, hir_id)