Auto merge of #47767 - estebank:as-suggestion, r=petrochenkov
Correctly format `extern crate` conflict resolution help Closes #45799. Follow up to @Cldfire's #45820. If the `extern` statement that will have a suggestion ends on a `;`, synthesize a new span that doesn't include it.
This commit is contained in:
commit
7046a40623
4 changed files with 37 additions and 3 deletions
|
@ -6115,6 +6115,7 @@ impl<'a> Parser<'a> {
|
|||
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