From 4eef7b613c7f9435bec591376170791de41fa38c Mon Sep 17 00:00:00 2001 From: Graydon Hoare Date: Wed, 1 Jun 2011 12:26:42 -0700 Subject: [PATCH] Bug fixes to pprust. --- src/comp/pretty/pprust.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/comp/pretty/pprust.rs b/src/comp/pretty/pprust.rs index 330c1c65302..e8983c63ad9 100644 --- a/src/comp/pretty/pprust.rs +++ b/src/comp/pretty/pprust.rs @@ -285,6 +285,7 @@ fn print_item(&ps s, &@ast::item item) { } case (ast::item_mod(?id,?_mod,_)) { head(s, "mod"); + word_nbsp(s, id); bopen(s); for (@ast::item itm in _mod.items) {print_item(s, itm);} bclose(s, item.span); @@ -481,11 +482,11 @@ fn print_expr(&ps s, &@ast::expr expr) { alt (expr.node) { case (ast::expr_vec(?exprs,?mut,_)) { + ibox(s.s, indent_unit); + word(s.s, "["); if (mut == ast::mut) { word_nbsp(s, "mutable"); } - ibox(s.s, indent_unit); - word(s.s, "["); commasep_exprs(s, inconsistent, exprs); word(s.s, "]"); end(s.s);