about summary refs log tree commit diff
path: root/src/libsyntax/parse
diff options
context:
space:
mode:
authorBrian Anderson <banderson@mozilla.com>2012-07-03 16:06:09 -0700
committerBrian Anderson <banderson@mozilla.com>2012-07-03 17:03:52 -0700
commit0f5eaef5fb2443acd3ea67250c953839c3d04d38 (patch)
tree3f22009e8299aca3a0814a2ed9eaa8180248f03f /src/libsyntax/parse
parent3f59a4bc64f46c5f44621327c697c5314b2f4358 (diff)
downloadrust-0f5eaef5fb2443acd3ea67250c953839c3d04d38.tar.gz
rust-0f5eaef5fb2443acd3ea67250c953839c3d04d38.zip
Remove rule requiring non-nil block-style statements to be semi-terminated
This is a subtle rule that no longer seems to be required.
Diffstat (limited to 'src/libsyntax/parse')
-rw-r--r--src/libsyntax/parse/classify.rs3
-rw-r--r--src/libsyntax/parse/parser.rs2
2 files changed, 1 insertions, 4 deletions
diff --git a/src/libsyntax/parse/classify.rs b/src/libsyntax/parse/classify.rs
index 9b36b77407e..4fcb761fa06 100644
--- a/src/libsyntax/parse/classify.rs
+++ b/src/libsyntax/parse/classify.rs
@@ -27,9 +27,6 @@ fn stmt_ends_with_semi(stmt: ast::stmt) -> bool {
       ast::stmt_expr(e, _) {
         ret expr_requires_semi_to_be_stmt(e);
       }
-      ast::stmt_semi(e, _) {
-        ret false;
-      }
     }
 }
 
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs
index 747ca07bee5..97185b6dfb9 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -1848,7 +1848,7 @@ class parser {
                       token::SEMI {
                         self.bump();
                         push(stmts,
-                             @{node: stmt_semi(e, stmt_id) with *stmt});
+                             @{node: stmt_expr(e, stmt_id) with *stmt});
                       }
                       token::RBRACE {
                         expr = some(e);