Skip to content

Commit

Permalink
Rollup merge of rust-lang#43463 - nrc:catch-span, r=petrochenkov
Browse files Browse the repository at this point in the history
Fix the spans of catch blocks to include the `do`
  • Loading branch information
Mark-Simulacrum committed Jul 26, 2017
2 parents 9d02019 + 5388470 commit f7d06b3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libsyntax/parse/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2243,9 +2243,9 @@ impl<'a> Parser<'a> {
attrs);
}
if self.is_catch_expr() {
let lo = self.span;
assert!(self.eat_keyword(keywords::Do));
assert!(self.eat_keyword(keywords::Catch));
let lo = self.prev_span;
return self.parse_catch_expr(lo, attrs);
}
if self.eat_keyword(keywords::Return) {
Expand Down

0 comments on commit f7d06b3

Please sign in to comment.