1
Fork 0

move span to self instead of crate

This commit is contained in:
SparkyPotato 2022-11-13 13:46:11 +05:30
parent 825f8edc2f
commit c7b2891315
3 changed files with 15 additions and 1 deletions

View file

@ -469,9 +469,11 @@ impl<'a, 'b> BuildReducedGraphVisitor<'a, 'b> {
}
// Replace `use foo::{ self };` with `use foo;`
let self_span = source.ident.span;
source = module_path.pop().unwrap();
if rename.is_none() {
ident = source.ident;
// Keep the span of `self`, but the name of `foo`
ident = Ident { name: source.ident.name, span: self_span };
}
}
} else {