We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5e25dc9 commit 9a7cb93Copy full SHA for 9a7cb93
src/libsyntax/parse/classify.rs
@@ -30,7 +30,8 @@ pub fn expr_requires_semi_to_be_stmt(e: &ast::Expr) -> bool {
30
ast::ExprKind::While(..) |
31
ast::ExprKind::WhileLet(..) |
32
ast::ExprKind::Loop(..) |
33
- ast::ExprKind::ForLoop(..) => false,
+ ast::ExprKind::ForLoop(..) |
34
+ ast::ExprKind::Catch(..) => false,
35
_ => true,
36
}
37
src/test/run-pass/catch-expr.rs
@@ -71,4 +71,10 @@ pub fn main() {
71
Ok(&my_string)
72
};
73
assert_eq!(res, Ok("test"));
74
+
75
+ do catch {
76
+ ()
77
+ }
78
79
+ ();
80
0 commit comments