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:
commit
b6120b39ab
@ -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,
|
||||
}
|
||||
}
|
||||
|
@ -41,7 +41,7 @@ fn foo() -> bool {
|
||||
result
|
||||
} else {
|
||||
4
|
||||
}
|
||||
};
|
||||
|
||||
if let Some(x) = aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa {
|
||||
// Nothing
|
||||
@ -254,5 +254,5 @@ fn repeats() {
|
||||
fn blocks() {
|
||||
if 1 + 1 == 2 {
|
||||
println!("yay arithmetix!");
|
||||
}
|
||||
};
|
||||
}
|
||||
|
@ -228,7 +228,7 @@ fn issue383() {
|
||||
match resolution.last_private {
|
||||
LastImport{..} => false,
|
||||
_ => true,
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
fn issue507() {
|
||||
|
Loading…
Reference in New Issue
Block a user