Fix the span for for expressions

This commit is contained in:
Nick Cameron 2015-04-09 20:35:27 +12:00
parent 287a544a30
commit 341870a2d1

View File

@ -2880,7 +2880,7 @@ impl<'a> Parser<'a> {
try!(self.expect_keyword(keywords::In));
let expr = try!(self.parse_expr_res(RESTRICTION_NO_STRUCT_LITERAL));
let loop_block = try!(self.parse_block());
let hi = self.span.hi;
let hi = self.last_span.hi;
Ok(self.mk_expr(lo, hi, ExprForLoop(pat, expr, loop_block, opt_ident)))
}