From 3dc0b804f1a50871d2a5187492ba92421727799c Mon Sep 17 00:00:00 2001 From: Nick Cameron Date: Mon, 9 Nov 2015 13:23:19 +1300 Subject: Don't strip semi-colons from expressions with non-void type since it can change semantics --- src/visitor.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'src') diff --git a/src/visitor.rs b/src/visitor.rs index 534b2c877fd..6114dfff077 100644 --- a/src/visitor.rs +++ b/src/visitor.rs @@ -507,12 +507,8 @@ fn semicolon_for_stmt(stmt: &ast::Stmt) -> bool { match expr.node { ast::Expr_::ExprWhile(..) | ast::Expr_::ExprWhileLet(..) | - ast::Expr_::ExprIf(..) | - ast::Expr_::ExprIfLet(..) | - ast::Expr_::ExprBlock(..) | ast::Expr_::ExprLoop(..) | - ast::Expr_::ExprForLoop(..) | - ast::Expr_::ExprMatch(..) => false, + ast::Expr_::ExprForLoop(..) => false, _ => true, } } -- cgit 1.4.1-3-g733a5