about summary refs log tree commit diff
path: root/src/libsyntax/parse/parser.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2014-02-07 03:26:34 -0800
committerbors <bors@rust-lang.org>2014-02-07 03:26:34 -0800
commitc3ccaacc6c90fc678cbba9c3c0427f0a7dece75c (patch)
treef9e1c89e0fb4d03228e4c41fb9a561178a5ba0d8 /src/libsyntax/parse/parser.rs
parent14cb4be6e90d0c5eb42a3eef58d083acc8e51837 (diff)
parente5463b996c84b34c6f7cb55a7e9e5cfdc29ca028 (diff)
downloadrust-c3ccaacc6c90fc678cbba9c3c0427f0a7dece75c.tar.gz
rust-c3ccaacc6c90fc678cbba9c3c0427f0a7dece75c.zip
auto merge of #12087 : sanxiyn/rust/show-span, r=huonw
Diffstat (limited to 'src/libsyntax/parse/parser.rs')
-rw-r--r--src/libsyntax/parse/parser.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs
index e1cbdd12bd3..aeeae94238b 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -1771,7 +1771,7 @@ impl Parser {
             self.commit_expr_expecting(*es.last().unwrap(), token::RPAREN);
 
             return if es.len() == 1 && !trailing_comma {
-                self.mk_expr(lo, self.span.hi, ExprParen(es[0]))
+                self.mk_expr(lo, hi, ExprParen(es[0]))
             }
             else {
                 self.mk_expr(lo, hi, ExprTup(es))
@@ -1994,7 +1994,7 @@ impl Parser {
                                 seq_sep_trailing_disallowed(token::COMMA),
                                 |p| p.parse_expr()
                             );
-                            hi = self.span.hi;
+                            hi = self.last_span.hi;
 
                             es.unshift(e);
                             let nd = self.mk_method_call(i, tys, es, NoSugar);
@@ -2510,7 +2510,7 @@ impl Parser {
                               parse_decl: |&mut Parser| -> P<FnDecl>,
                               parse_body: |&mut Parser| -> @Expr)
                               -> @Expr {
-        let lo = self.last_span.lo;
+        let lo = self.span.lo;
         let decl = parse_decl(self);
         let body = parse_body(self);
         let fakeblock = P(ast::Block {