summary refs log tree commit diff
path: root/src/libsyntax/parse/classify.rs
diff options
context:
space:
mode:
authorAleksey Kladov <aleksey.kladov@gmail.com>2017-04-01 11:11:31 +0300
committerAleksey Kladov <aleksey.kladov@gmail.com>2017-07-18 03:42:21 +0300
commit5e25dc9966c28f057b33045be9d4967815dcba05 (patch)
treea2b2b726b95d9056364a197dd145430802918c7e /src/libsyntax/parse/classify.rs
parent2652ce6771b114189cdc1f9bd026a10af0a714e0 (diff)
downloadrust-5e25dc9966c28f057b33045be9d4967815dcba05.tar.gz
rust-5e25dc9966c28f057b33045be9d4967815dcba05.zip
Unify rules about commas in match arms and semicolons in expressions
Diffstat (limited to 'src/libsyntax/parse/classify.rs')
-rw-r--r--src/libsyntax/parse/classify.rs9
1 files changed, 1 insertions, 8 deletions
diff --git a/src/libsyntax/parse/classify.rs b/src/libsyntax/parse/classify.rs
index 0c6f09ba766..d9f76ce3592 100644
--- a/src/libsyntax/parse/classify.rs
+++ b/src/libsyntax/parse/classify.rs
@@ -12,7 +12,7 @@
 
 // Predicates on exprs and stmts that the pretty-printer and parser use
 
-use ast::{self, BlockCheckMode};
+use ast;
 
 /// Does this expression require a semicolon to be treated
 /// as a statement? The negation of this: 'can this expression
@@ -35,13 +35,6 @@ pub fn expr_requires_semi_to_be_stmt(e: &ast::Expr) -> bool {
     }
 }
 
-pub fn expr_is_simple_block(e: &ast::Expr) -> bool {
-    match e.node {
-        ast::ExprKind::Block(ref block) => block.rules == BlockCheckMode::Default,
-        _ => false,
-    }
-}
-
 /// this statement requires a semicolon after it.
 /// note that in one case (`stmt_semi`), we've already
 /// seen the semicolon, and thus don't need another.