about summary refs log tree commit diff
path: root/src/libsyntax/parse/parser.rs
diff options
context:
space:
mode:
authorMark Simulacrum <mark.simulacrum@gmail.com>2017-07-26 06:15:06 -0600
committerGitHub <noreply@github.com>2017-07-26 06:15:06 -0600
commitf7d06b3418ec574385c06c1d121b1ee89b12e743 (patch)
tree0d3a3791bbcee964e9fbca49cb109c2a1c8a13d1 /src/libsyntax/parse/parser.rs
parent9d02019f8f89992b92c5b9c73d32db16d7e673e1 (diff)
parent53884705cbaad44def64b409be1ca7107997f776 (diff)
downloadrust-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.rs2
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) {