From c39ad4b145f9eee71a5e6b52f9d10acc7e43ce0d Mon Sep 17 00:00:00 2001 From: Cldfire Date: Mon, 6 Nov 2017 21:40:21 -0500 Subject: Correctly format `extern crate` conflict resolution help --- src/libsyntax/parse/parser.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/libsyntax/parse') diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index 8213d604b91..a7977d5235d 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -6128,9 +6128,11 @@ impl<'a> Parser<'a> { } else { (None, crate_name) }; - self.expect(&token::Semi)?; + // 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)?; + Ok(self.mk_item(lo.to(prev_span), ident, ItemKind::ExternCrate(maybe_path), -- cgit 1.4.1-3-g733a5