mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-28 19:27:30 +03:00
Merge pull request #571 from nrc/semi
Don't strip semi-colons from expressions with non-void type since it …
This commit is contained in:
+1
-5
@@ -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,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user