about summary refs log tree commit diff
path: root/src/libsyntax/parse/classify.rs
diff options
context:
space:
mode:
authorTshepang Lekhonkhobe <tshepang@gmail.com>2016-01-27 21:42:26 +0200
committerTshepang Lekhonkhobe <tshepang@gmail.com>2016-01-27 21:45:14 +0200
commitbbdef0ce59a74aa585186b4987e6f7751e49aea7 (patch)
tree83096362580b53c5f29f056ca93e549e5578c18c /src/libsyntax/parse/classify.rs
parentb8b18aac12214d7135a083e2e6946aa197185d49 (diff)
downloadrust-bbdef0ce59a74aa585186b4987e6f7751e49aea7.tar.gz
rust-bbdef0ce59a74aa585186b4987e6f7751e49aea7.zip
rustfmt syntax::parse
Diffstat (limited to 'src/libsyntax/parse/classify.rs')
-rw-r--r--src/libsyntax/parse/classify.rs28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/libsyntax/parse/classify.rs b/src/libsyntax/parse/classify.rs
index 8b3faaaca14..1193224bdb6 100644
--- a/src/libsyntax/parse/classify.rs
+++ b/src/libsyntax/parse/classify.rs
@@ -23,22 +23,22 @@ use ast;
 /// isn't parsed as (if true {...} else {...} | x) | 5
 pub fn expr_requires_semi_to_be_stmt(e: &ast::Expr) -> bool {
     match e.node {
-        ast::ExprIf(..)
-        | ast::ExprIfLet(..)
-        | ast::ExprMatch(..)
-        | ast::ExprBlock(_)
-        | ast::ExprWhile(..)
-        | ast::ExprWhileLet(..)
-        | ast::ExprLoop(..)
-        | ast::ExprForLoop(..) => false,
-        _ => true
+        ast::ExprIf(..) |
+        ast::ExprIfLet(..) |
+        ast::ExprMatch(..) |
+        ast::ExprBlock(_) |
+        ast::ExprWhile(..) |
+        ast::ExprWhileLet(..) |
+        ast::ExprLoop(..) |
+        ast::ExprForLoop(..) => false,
+        _ => true,
     }
 }
 
 pub fn expr_is_simple_block(e: &ast::Expr) -> bool {
     match e.node {
         ast::ExprBlock(ref block) => block.rules == ast::DefaultBlock,
-        _ => false
+        _ => false,
     }
 }
 
@@ -50,11 +50,11 @@ pub fn stmt_ends_with_semi(stmt: &ast::Stmt_) -> bool {
         ast::StmtDecl(ref d, _) => {
             match d.node {
                 ast::DeclLocal(_) => true,
-                ast::DeclItem(_) => false
+                ast::DeclItem(_) => false,
             }
         }
-        ast::StmtExpr(ref e, _) => { expr_requires_semi_to_be_stmt(e) }
-        ast::StmtSemi(..) => { false }
-        ast::StmtMac(..) => { false }
+        ast::StmtExpr(ref e, _) => expr_requires_semi_to_be_stmt(e),
+        ast::StmtSemi(..) => false,
+        ast::StmtMac(..) => false,
     }
 }