about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2014-02-11 08:22:22 -0800
committerbors <bors@rust-lang.org>2014-02-11 08:22:22 -0800
commit616e53f0380854300ad53a8a85b809d93e272f0c (patch)
treec065ce21da9eb6d2cce20a1bd37c013a44737edb /src
parent5b5ebf230b02e430e087b3f2edaaf1cfe5567b34 (diff)
parentf3b5ec2318914ae5a74d06e47b6f567f7dfc3623 (diff)
downloadrust-616e53f0380854300ad53a8a85b809d93e272f0c.tar.gz
rust-616e53f0380854300ad53a8a85b809d93e272f0c.zip
auto merge of #12181 : sanxiyn/rust/accurate-span-4, r=alexcrichton
Diffstat (limited to 'src')
-rw-r--r--src/libsyntax/parse/parser.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs
index 507debc8ce0..4bef7dc5bb5 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -1799,7 +1799,7 @@ impl Parser {
         } else if self.eat_keyword(keywords::Self) {
             let path = ast_util::ident_to_path(mk_sp(lo, hi), special_idents::self_);
             ex = ExprPath(path);
-            hi = self.span.hi;
+            hi = self.last_span.hi;
         } else if self.eat_keyword(keywords::If) {
             return self.parse_if_expr();
         } else if self.eat_keyword(keywords::For) {
@@ -1934,7 +1934,7 @@ impl Parser {
                                          &[token::COMMA], &[token::RBRACE]);
                     }
 
-                    hi = pth.span.hi;
+                    hi = self.span.hi;
                     self.expect(&token::RBRACE);
                     ex = ExprStruct(pth, fields, base);
                     return self.mk_expr(lo, hi, ex);