about summary refs log tree commit diff
path: root/src/libsyntax/parse/classify.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2018-08-23 11:46:24 +0000
committerbors <bors@rust-lang.org>2018-08-23 11:46:24 +0000
commit35bf1ae25799a4e62131159f052e0a3cbd27c960 (patch)
tree5f02fe2f099363dc95e480b4f9a62d6c79eaaafb /src/libsyntax/parse/classify.rs
parent827e57c2f69a9caad36fab189770ad0bb8957d4f (diff)
parent009547141729b6d66f721065820edf9ddbde4831 (diff)
downloadrust-35bf1ae25799a4e62131159f052e0a3cbd27c960.tar.gz
rust-35bf1ae25799a4e62131159f052e0a3cbd27c960.zip
Auto merge of #52602 - scottmcm:tryblock-expr, r=nikomatsakis
Implement try block expressions

I noticed that `try` wasn't a keyword yet in Rust 2018, so...

~~Fix​es https://github.com/rust-lang/rust/issues/52604~~ That was fixed by PR https://github.com/rust-lang/rust/pull/53135
cc https://github.com/rust-lang/rust/issues/31436 https://github.com/rust-lang/rust/issues/50412
Diffstat (limited to 'src/libsyntax/parse/classify.rs')
-rw-r--r--src/libsyntax/parse/classify.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libsyntax/parse/classify.rs b/src/libsyntax/parse/classify.rs
index 531483e7de1..99f9d0511fe 100644
--- a/src/libsyntax/parse/classify.rs
+++ b/src/libsyntax/parse/classify.rs
@@ -31,7 +31,7 @@ pub fn expr_requires_semi_to_be_stmt(e: &ast::Expr) -> bool {
         ast::ExprKind::WhileLet(..) |
         ast::ExprKind::Loop(..) |
         ast::ExprKind::ForLoop(..) |
-        ast::ExprKind::Catch(..) => false,
+        ast::ExprKind::TryBlock(..) => false,
         _ => true,
     }
 }