store the span of the nested part of the use tree in the ast
This commit is contained in:
parent
2ec337c193
commit
13f76235b3
17 changed files with 45 additions and 36 deletions
|
@ -134,8 +134,8 @@ impl<'hir> LoweringContext<'_, 'hir> {
|
|||
|
||||
fn lower_item_id_use_tree(&mut self, tree: &UseTree, vec: &mut SmallVec<[hir::ItemId; 1]>) {
|
||||
match &tree.kind {
|
||||
UseTreeKind::Nested(nested_vec) => {
|
||||
for &(ref nested, id) in nested_vec {
|
||||
UseTreeKind::Nested { items, .. } => {
|
||||
for &(ref nested, id) in items {
|
||||
vec.push(hir::ItemId {
|
||||
owner_id: hir::OwnerId { def_id: self.local_def_id(id) },
|
||||
});
|
||||
|
@ -517,7 +517,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
|
|||
let path = self.lower_use_path(res, &path, ParamMode::Explicit);
|
||||
hir::ItemKind::Use(path, hir::UseKind::Glob)
|
||||
}
|
||||
UseTreeKind::Nested(ref trees) => {
|
||||
UseTreeKind::Nested { items: ref trees, .. } => {
|
||||
// Nested imports are desugared into simple imports.
|
||||
// So, if we start with
|
||||
//
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue