1
Fork 0

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:
bors 2018-01-28 07:44:14 +00:00
commit 7046a40623
4 changed files with 37 additions and 3 deletions

View file

@ -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),