about summary refs log tree commit diff
path: root/src/libsyntax/parse
diff options
context:
space:
mode:
authorCldfire <cldfire@3grid.net>2017-11-06 21:40:21 -0500
committerEsteban Küber <esteban@kuber.com.ar>2018-01-25 22:36:48 -0800
commitc39ad4b145f9eee71a5e6b52f9d10acc7e43ce0d (patch)
tree563746b6703991bf864b5bc07e047a7606d47626 /src/libsyntax/parse
parent4cf26f8a133039bfeb5b9f684df9f547278db206 (diff)
downloadrust-c39ad4b145f9eee71a5e6b52f9d10acc7e43ce0d.tar.gz
rust-c39ad4b145f9eee71a5e6b52f9d10acc7e43ce0d.zip
Correctly format `extern crate` conflict resolution help
Diffstat (limited to 'src/libsyntax/parse')
-rw-r--r--src/libsyntax/parse/parser.rs4
1 files changed, 3 insertions, 1 deletions
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),