diff options
| author | Mark Simulacrum <mark.simulacrum@gmail.com> | 2017-07-26 06:15:06 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-07-26 06:15:06 -0600 |
| commit | f7d06b3418ec574385c06c1d121b1ee89b12e743 (patch) | |
| tree | 0d3a3791bbcee964e9fbca49cb109c2a1c8a13d1 /src/libsyntax/parse/parser.rs | |
| parent | 9d02019f8f89992b92c5b9c73d32db16d7e673e1 (diff) | |
| parent | 53884705cbaad44def64b409be1ca7107997f776 (diff) | |
| download | rust-f7d06b3418ec574385c06c1d121b1ee89b12e743.tar.gz rust-f7d06b3418ec574385c06c1d121b1ee89b12e743.zip | |
Rollup merge of #43463 - nrc:catch-span, r=petrochenkov
Fix the spans of catch blocks to include the `do`
Diffstat (limited to 'src/libsyntax/parse/parser.rs')
| -rw-r--r-- | src/libsyntax/parse/parser.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index d6a57c2874f..2cd84d202ff 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -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) { |
