rustc_ast_lowering: Stop lowering imports into multiple items
Lower them into a single item with multiple resolutions instead. This also allows to remove additional `NodId`s and `DefId`s related to those additional items.
This commit is contained in:
parent
1f259ae679
commit
b32a4edb20
25 changed files with 79 additions and 198 deletions
|
@ -158,14 +158,6 @@ impl<'a, 'b> visit::Visitor<'a> for DefCollector<'a, 'b> {
|
|||
|
||||
fn visit_use_tree(&mut self, use_tree: &'a UseTree, id: NodeId, _nested: bool) {
|
||||
self.create_def(id, DefPathData::Use, use_tree.span);
|
||||
match use_tree.kind {
|
||||
UseTreeKind::Simple(_, id1, id2) => {
|
||||
self.create_def(id1, DefPathData::Use, use_tree.prefix.span);
|
||||
self.create_def(id2, DefPathData::Use, use_tree.prefix.span);
|
||||
}
|
||||
UseTreeKind::Glob => (),
|
||||
UseTreeKind::Nested(..) => {}
|
||||
}
|
||||
visit::walk_use_tree(self, use_tree, id);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue