about summary refs log tree commit diff
path: root/src/libsyntax/parse/parser.rs
diff options
context:
space:
mode:
authorJoshua Yanovski <pythonesque@gmail.com>2013-10-28 19:22:42 -0700
committerJoshua Yanovski <pythonesque@gmail.com>2013-10-28 22:57:34 -0700
commit01ab8542fbcfbea2cb0dcdc538e56a7167f70f51 (patch)
tree3b25fae9af67f37473f301c3db91aa6ffbe62097 /src/libsyntax/parse/parser.rs
parentdba60700804119f7e953e6b2b72ce4875c9d60cb (diff)
downloadrust-01ab8542fbcfbea2cb0dcdc538e56a7167f70f51.tar.gz
rust-01ab8542fbcfbea2cb0dcdc538e56a7167f70f51.zip
Field identifiers now include specific spans (Closes #8263).
Diffstat (limited to 'src/libsyntax/parse/parser.rs')
-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),
         }