move span to self
instead of crate
This commit is contained in:
parent
825f8edc2f
commit
c7b2891315
3 changed files with 15 additions and 1 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue