mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 14:55:26 +00:00
Add parens, as needed, around else-if conditions.
This commit is contained in:
parent
2c6eba00dd
commit
ce1877dc8e
@ -625,7 +625,7 @@ fn print_if(s: ps, test: @ast::expr, blk: ast::blk,
|
||||
cbox(s, indent_unit - 1u);
|
||||
ibox(s, 0u);
|
||||
word(s.s, " else if ");
|
||||
print_expr(s, i);
|
||||
print_maybe_parens_discrim(s, i);
|
||||
space(s.s);
|
||||
print_block(s, t);
|
||||
do_else(s, e);
|
||||
|
@ -21,8 +21,15 @@ fn what() {
|
||||
}
|
||||
|
||||
fn zombiejesus() {
|
||||
do { while (ret) { if (ret) { alt (ret) { _ { ret ? ret : ret } } } } }
|
||||
while ret
|
||||
do {
|
||||
while (ret) {
|
||||
if (ret) {
|
||||
alt (ret) { _ { ret ? ret : ret } };
|
||||
} else if (ret) {
|
||||
ret;
|
||||
}
|
||||
}
|
||||
} while ret
|
||||
}
|
||||
|
||||
fn notsure() {
|
||||
|
Loading…
Reference in New Issue
Block a user