about summary refs log tree commit diff
path: root/src/libsyntax/parse
diff options
context:
space:
mode:
authorNick Cameron <ncameron@mozilla.com>2017-07-25 11:39:41 +1200
committerNick Cameron <ncameron@mozilla.com>2017-07-25 11:39:41 +1200
commit53884705cbaad44def64b409be1ca7107997f776 (patch)
tree0f39acb47f2b867c3647897f97c6e6570e6cf658 /src/libsyntax/parse
parentb80e946101dd49dd1864b6229f9430c55036c7ce (diff)
downloadrust-53884705cbaad44def64b409be1ca7107997f776.tar.gz
rust-53884705cbaad44def64b409be1ca7107997f776.zip
Fix the spans of catch blocks to include the `do`
Diffstat (limited to 'src/libsyntax/parse')
-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) {