]> git.lizzy.rs Git - rust.git/commitdiff
Correct span for ExprCall and ExprIndex
authorSeo Sanghyeon <sanxiyn@gmail.com>
Thu, 16 Jan 2014 13:45:01 +0000 (22:45 +0900)
committerSeo Sanghyeon <sanxiyn@gmail.com>
Thu, 16 Jan 2014 13:45:01 +0000 (22:45 +0900)
src/libsyntax/parse/parser.rs

index 715ce644726ab888d235eeee53efec9270a418de..438e6399939077821474e8a4ed9c70e2c696042b 100644 (file)
@@ -2025,7 +2025,7 @@ pub fn parse_dot_or_call_expr_with(&mut self, e0: @Expr) -> @Expr {
                     seq_sep_trailing_disallowed(token::COMMA),
                     |p| p.parse_expr()
                 );
-                hi = self.span.hi;
+                hi = self.last_span.hi;
 
                 let nd = self.mk_call(e, es, NoSugar);
                 e = self.mk_expr(lo, hi, nd);
@@ -2035,7 +2035,7 @@ pub fn parse_dot_or_call_expr_with(&mut self, e0: @Expr) -> @Expr {
               token::LBRACKET => {
                 self.bump();
                 let ix = self.parse_expr();
-                hi = ix.span.hi;
+                hi = self.span.hi;
                 self.commit_expr_expecting(ix, token::RBRACKET);
                 let index = self.mk_index(e, ix);
                 e = self.mk_expr(lo, hi, index)