We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a736079 commit 9c35b63Copy full SHA for 9c35b63
[refs]
@@ -1,2 +1,2 @@
1
---
2
-refs/heads/master: 9e1dc703d2fce55ca8c79fdc68188560c6d78d9c
+refs/heads/master: de383bcfedc5ac67c6a27c51f1a8226f5a9bdcd0
trunk/src/comp/syntax/parse/parser.rs
@@ -1621,8 +1621,8 @@ fn expr_requires_semi_to_be_stmt(e: @ast::expr) -> bool {
1621
1622
fn stmt_to_expr(stmt: @ast::stmt) -> option::t<@ast::expr> {
1623
alt stmt.node {
1624
- ast::stmt_expr(e, _) { some(e) }
1625
- ast::stmt_decl(_, _) { none }
+ ast::stmt_expr(e, _) when expr_requires_semi_to_be_stmt(e) { some(e) }
+ _ { none }
1626
}
1627
1628
0 commit comments