about summary refs log tree commit diff
path: root/src/libsyntax/parse
diff options
context:
space:
mode:
authorEsteban Küber <esteban@kuber.com.ar>2018-01-25 22:40:38 -0800
committerEsteban Küber <esteban@kuber.com.ar>2018-01-26 15:06:09 -0800
commit445e404ba4c9782e4f5028eccb7c9473ae33c70a (patch)
tree553c00ee92537a28e03fd5c973e2163257476296 /src/libsyntax/parse
parentc39ad4b145f9eee71a5e6b52f9d10acc7e43ce0d (diff)
downloadrust-445e404ba4c9782e4f5028eccb7c9473ae33c70a.tar.gz
rust-445e404ba4c9782e4f5028eccb7c9473ae33c70a.zip
Instead of modifying the item's span synthesize it
Diffstat (limited to 'src/libsyntax/parse')
-rw-r--r--src/libsyntax/parse/parser.rs3
1 files changed, 1 insertions, 2 deletions
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,