diff options
| author | bors <bors@rust-lang.org> | 2013-11-28 20:31:39 -0800 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2013-11-28 20:31:39 -0800 |
| commit | bf6964ecb67f4ffce6be75130ab7a3be793960ff (patch) | |
| tree | ddf8aabea4d05b3ae0cb977cc1a466526f871b06 /src/libsyntax/parse/classify.rs | |
| parent | 90d06ecf6b26e949921778f0d479ea1532077200 (diff) | |
| parent | ab387a68388974a432951e806851936898907fd0 (diff) | |
| download | rust-bf6964ecb67f4ffce6be75130ab7a3be793960ff.tar.gz rust-bf6964ecb67f4ffce6be75130ab7a3be793960ff.zip | |
auto merge of #10709 : alexcrichton/rust/snapshot, r=pcwalton
Diffstat (limited to 'src/libsyntax/parse/classify.rs')
| -rw-r--r-- | src/libsyntax/parse/classify.rs | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/libsyntax/parse/classify.rs b/src/libsyntax/parse/classify.rs index a4df5f4a5fc..81b98e537f4 100644 --- a/src/libsyntax/parse/classify.rs +++ b/src/libsyntax/parse/classify.rs @@ -23,12 +23,12 @@ 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::ExprMatch(*) + ast::ExprIf(..) + | ast::ExprMatch(..) | ast::ExprBlock(_) - | ast::ExprWhile(*) - | ast::ExprLoop(*) - | ast::ExprForLoop(*) + | ast::ExprWhile(..) + | ast::ExprLoop(..) + | ast::ExprForLoop(..) | ast::ExprCall(_, _, ast::DoSugar) | ast::ExprCall(_, _, ast::ForSugar) | ast::ExprMethodCall(_, _, _, _, _, ast::DoSugar) @@ -40,7 +40,7 @@ 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::ExprBlock( - ast::Block { rules: ast::DefaultBlock, _ } + ast::Block { rules: ast::DefaultBlock, .. } ) => true, _ => false } @@ -58,7 +58,7 @@ pub fn stmt_ends_with_semi(stmt: &ast::Stmt) -> bool { } } ast::StmtExpr(e, _) => { expr_requires_semi_to_be_stmt(e) } - ast::StmtSemi(*) => { false } - ast::StmtMac(*) => { false } + ast::StmtSemi(..) => { false } + ast::StmtMac(..) => { false } } } |
