about summary refs log tree commit diff
path: root/src/libsyntax/parse
diff options
context:
space:
mode:
authorKampfkarren <boynedmaster@gmail.com>2019-04-10 19:22:43 -0700
committerKampfkarren <boynedmaster@gmail.com>2019-04-10 19:22:43 -0700
commit1156ce6f54dde7555bb00828ba4ec6c2a170fc83 (patch)
tree0a5dfd32a8483a83097ea62506772b777d480a08 /src/libsyntax/parse
parent4af7cf37d46d614e72e791c13153ef9a706716e9 (diff)
downloadrust-1156ce6f54dde7555bb00828ba4ec6c2a170fc83.tar.gz
rust-1156ce6f54dde7555bb00828ba4ec6c2a170fc83.zip
Feedback
Diffstat (limited to 'src/libsyntax/parse')
-rw-r--r--src/libsyntax/parse/parser.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs
index 4d2a9f2c13c..d95a5843eb5 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -3620,8 +3620,9 @@ impl<'a> Parser<'a> {
         attrs.extend(iattrs);
         if self.eat_keyword(keywords::Catch) {
             let mut error = self.struct_span_err(self.prev_span,
-                                                 "`try {} catch` is not a valid syntax");
+                                                 "keyword `catch` cannot follow a `try` block");
             error.help("try using `match` on the result of the `try` block instead");
+            error.emit();
             Err(error)
         } else {
             Ok(self.mk_expr(span_lo.to(body.span), ExprKind::TryBlock(body), attrs))