diff options
| author | Niko Matsakis <niko@alum.mit.edu> | 2012-07-13 18:43:52 -0700 |
|---|---|---|
| committer | Niko Matsakis <niko@alum.mit.edu> | 2012-07-14 17:37:20 -0700 |
| commit | 41a21f053ced3df8fe9acc66cb30fb6005339b3e (patch) | |
| tree | 12cf2e5e9ba0405e31a0a6abd509b6a5d3f477c4 /src/libsyntax/parse/classify.rs | |
| parent | 1fbb9d035ddd0c9ae56a91167fda2f100c3987ad (diff) | |
| download | rust-41a21f053ced3df8fe9acc66cb30fb6005339b3e.tar.gz rust-41a21f053ced3df8fe9acc66cb30fb6005339b3e.zip | |
remove typestate from code, tests, and docs
Diffstat (limited to 'src/libsyntax/parse/classify.rs')
| -rw-r--r-- | src/libsyntax/parse/classify.rs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/libsyntax/parse/classify.rs b/src/libsyntax/parse/classify.rs index 9b36b77407e..20fb7772d08 100644 --- a/src/libsyntax/parse/classify.rs +++ b/src/libsyntax/parse/classify.rs @@ -6,8 +6,7 @@ import ast_util::operator_prec; fn expr_requires_semi_to_be_stmt(e: @ast::expr) -> bool { alt e.node { - ast::expr_if(_, _, _) | ast::expr_if_check(_, _, _) - | ast::expr_alt(_, _, _) | ast::expr_block(_) + ast::expr_if(_, _, _) | ast::expr_alt(_, _, _) | ast::expr_block(_) | ast::expr_while(_, _) | ast::expr_loop(_) | ast::expr_call(_, _, true) { false @@ -44,7 +43,6 @@ fn need_parens(expr: @ast::expr, outer_prec: uint) -> bool { ast::expr_assign_op(_, _, _) { true } ast::expr_ret(_) { true } ast::expr_assert(_) { true } - ast::expr_check(_, _) { true } ast::expr_log(_, _, _) { true } _ { !parse::classify::expr_requires_semi_to_be_stmt(expr) } } @@ -64,8 +62,9 @@ fn ends_in_lit_int(ex: @ast::expr) -> bool { ast::expr_move(_, sub) | ast::expr_copy(sub) | ast::expr_assign(_, sub) | ast::expr_assign_op(_, _, sub) | ast::expr_swap(_, sub) | - ast::expr_log(_, _, sub) | ast::expr_assert(sub) | - ast::expr_check(_, sub) { ends_in_lit_int(sub) } + ast::expr_log(_, _, sub) | ast::expr_assert(sub) { + ends_in_lit_int(sub) + } ast::expr_fail(osub) | ast::expr_ret(osub) { alt osub { some(ex) { ends_in_lit_int(ex) } |
