Skip to content

Commit 5388470

Browse files
committed
Fix the spans of catch blocks to include the do
1 parent b80e946 commit 5388470

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libsyntax/parse/parser.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2243,9 +2243,9 @@ impl<'a> Parser<'a> {
22432243
attrs);
22442244
}
22452245
if self.is_catch_expr() {
2246+
let lo = self.span;
22462247
assert!(self.eat_keyword(keywords::Do));
22472248
assert!(self.eat_keyword(keywords::Catch));
2248-
let lo = self.prev_span;
22492249
return self.parse_catch_expr(lo, attrs);
22502250
}
22512251
if self.eat_keyword(keywords::Return) {

0 commit comments

Comments
 (0)