Instead of modifying the item's span synthesize it
This commit is contained in:
parent
c39ad4b145
commit
445e404ba4
4 changed files with 12 additions and 6 deletions
|
@ -6128,11 +6128,10 @@ impl<'a> Parser<'a> {
|
|||
} else {
|
||||
(None, crate_name)
|
||||
};
|
||||
|
||||
// We grab this before expecting the `;` so it's not a part of the span
|
||||
let prev_span = self.prev_span;
|
||||
self.expect(&token::Semi)?;
|
||||
|
||||
let prev_span = self.prev_span;
|
||||
|
||||
Ok(self.mk_item(lo.to(prev_span),
|
||||
ident,
|
||||
ItemKind::ExternCrate(maybe_path),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue