Correctly format extern crate conflict resolution help

This commit is contained in:
Cldfire 2017-11-06 21:40:21 -05:00 committed by Esteban Küber
parent 4cf26f8a13
commit c39ad4b145
4 changed files with 31 additions and 3 deletions

View file

@ -6128,9 +6128,11 @@ 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),