Skip to content

Commit 4eef7b6

Browse files
committed
Bug fixes to pprust.
1 parent 49742b8 commit 4eef7b6

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/comp/pretty/pprust.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,7 @@ fn print_item(&ps s, &@ast::item item) {
285285
}
286286
case (ast::item_mod(?id,?_mod,_)) {
287287
head(s, "mod");
288+
word_nbsp(s, id);
288289
bopen(s);
289290
for (@ast::item itm in _mod.items) {print_item(s, itm);}
290291
bclose(s, item.span);
@@ -481,11 +482,11 @@ fn print_expr(&ps s, &@ast::expr expr) {
481482

482483
alt (expr.node) {
483484
case (ast::expr_vec(?exprs,?mut,_)) {
485+
ibox(s.s, indent_unit);
486+
word(s.s, "[");
484487
if (mut == ast::mut) {
485488
word_nbsp(s, "mutable");
486489
}
487-
ibox(s.s, indent_unit);
488-
word(s.s, "[");
489490
commasep_exprs(s, inconsistent, exprs);
490491
word(s.s, "]");
491492
end(s.s);

0 commit comments

Comments
 (0)