diff options
| author | Aleksey Kladov <aleksey.kladov@gmail.com> | 2017-04-01 18:11:17 +0300 |
|---|---|---|
| committer | Aleksey Kladov <aleksey.kladov@gmail.com> | 2017-07-18 03:42:21 +0300 |
| commit | 9a7cb9398dc23643bce69220cd63480aa7775515 (patch) | |
| tree | b76c7dc1302c1c552e7bf167761b91fd8ff81b1d /src/libsyntax/parse | |
| parent | 5e25dc9966c28f057b33045be9d4967815dcba05 (diff) | |
| download | rust-9a7cb9398dc23643bce69220cd63480aa7775515.tar.gz rust-9a7cb9398dc23643bce69220cd63480aa7775515.zip | |
Catch expression does not require semicolon to be a statement
Diffstat (limited to 'src/libsyntax/parse')
| -rw-r--r-- | src/libsyntax/parse/classify.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libsyntax/parse/classify.rs b/src/libsyntax/parse/classify.rs index d9f76ce3592..b8e02556625 100644 --- a/src/libsyntax/parse/classify.rs +++ b/src/libsyntax/parse/classify.rs @@ -30,7 +30,8 @@ pub fn expr_requires_semi_to_be_stmt(e: &ast::Expr) -> bool { ast::ExprKind::While(..) | ast::ExprKind::WhileLet(..) | ast::ExprKind::Loop(..) | - ast::ExprKind::ForLoop(..) => false, + ast::ExprKind::ForLoop(..) | + ast::ExprKind::Catch(..) => false, _ => true, } } |
