Skip to content

Commit 341870a

Browse files
committed
Fix the span for for expressions
1 parent 287a544 commit 341870a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libsyntax/parse/parser.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2880,7 +2880,7 @@ impl<'a> Parser<'a> {
28802880
try!(self.expect_keyword(keywords::In));
28812881
let expr = try!(self.parse_expr_res(RESTRICTION_NO_STRUCT_LITERAL));
28822882
let loop_block = try!(self.parse_block());
2883-
let hi = self.span.hi;
2883+
let hi = self.last_span.hi;
28842884

28852885
Ok(self.mk_expr(lo, hi, ExprForLoop(pat, expr, loop_block, opt_ident)))
28862886
}

0 commit comments

Comments
 (0)