From 445e404ba4c9782e4f5028eccb7c9473ae33c70a Mon Sep 17 00:00:00 2001 From: Esteban Küber Date: Thu, 25 Jan 2018 22:40:38 -0800 Subject: Instead of modifying the item's span synthesize it --- src/libsyntax/parse/parser.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/libsyntax/parse') diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index a7977d5235d..35e89652c99 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -6128,10 +6128,9 @@ 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, -- cgit 1.4.1-3-g733a5