From 01ab8542fbcfbea2cb0dcdc538e56a7167f70f51 Mon Sep 17 00:00:00 2001 From: Joshua Yanovski Date: Mon, 28 Oct 2013 19:22:42 -0700 Subject: Field identifiers now include specific spans (Closes #8263). --- src/libsyntax/parse/parser.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/libsyntax/parse/parser.rs') 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), } -- cgit 1.4.1-3-g733a5