about summary refs log tree commit diff
path: root/src/libsyntax/parse
diff options
context:
space:
mode:
Diffstat (limited to 'src/libsyntax/parse')
-rw-r--r--src/libsyntax/parse/parser.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs
index 5a5e310e56f..8b399266676 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -1549,10 +1549,11 @@ impl Parser {
     pub fn parse_field(&self) -> Field {
         let lo = self.span.lo;
         let i = self.parse_ident();
+        let hi = self.last_span.hi;
         self.expect(&token::COLON);
         let e = self.parse_expr();
         ast::Field {
-            ident: i,
+            ident: spanned(lo, hi, i),
             expr: e,
             span: mk_sp(lo, e.span.hi),
         }