Skip to content

Commit c6e82db

Browse files
committed
---
yaml --- r: 3270 b: refs/heads/master c: 035d60d h: refs/heads/master v: v3
1 parent 0b7652a commit c6e82db

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: 1ad8efa86e4581677274f76eb0730ab5883deadb
2+
refs/heads/master: 035d60d533d4c34c9837951bdc819c498992dcba

trunk/src/comp/pretty/pprust.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -503,9 +503,11 @@ fn print_block(&ps s, ast::block blk) {
503503
}
504504

505505
fn print_if(&ps s, &@ast::expr test, &ast::block block,
506-
&option::t[@ast::expr] elseopt, &str chk) {
506+
&option::t[@ast::expr] elseopt, bool chk) {
507507
head(s, "if");
508-
word_space(s, chk);
508+
if (chk) {
509+
word_nbsp(s, "check");
510+
}
509511
popen(s);
510512
print_expr(s, test);
511513
pclose(s);
@@ -651,10 +653,10 @@ fn print_expr(&ps s, &@ast::expr expr) {
651653
print_type(s, *ty);
652654
}
653655
case (ast::expr_if(?test, ?block, ?elseopt, _)) {
654-
print_if(s, test, block, elseopt, "");
656+
print_if(s, test, block, elseopt, false);
655657
}
656658
case (ast::expr_if_check(?test, ?block, ?elseopt, _)) {
657-
print_if(s, test, block, elseopt, "check");
659+
print_if(s, test, block, elseopt, true);
658660
}
659661
case (ast::expr_while(?test, ?block, _)) {
660662
head(s, "while");

0 commit comments

Comments
 (0)