Skip to content

Commit f7d06b3

Browse files
Rollup merge of rust-lang#43463 - nrc:catch-span, r=petrochenkov
Fix the spans of catch blocks to include the `do`
2 parents 9d02019 + 5388470 commit f7d06b3

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
@@ -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)