From 87f3ea7705ccc70d7a4c4cf7fe658dbd53348bf6 Mon Sep 17 00:00:00 2001 From: Brian Anderson Date: Fri, 7 Dec 2012 17:55:34 -0800 Subject: [PATCH] Fix pretty-printing of trait constraints --- src/libsyntax/print/pprust.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/libsyntax/print/pprust.rs b/src/libsyntax/print/pprust.rs index 47f9af5986c..be156a4c656 100644 --- a/src/libsyntax/print/pprust.rs +++ b/src/libsyntax/print/pprust.rs @@ -564,9 +564,11 @@ fn print_item(s: ps, &&item: @ast::item) { print_ident(s, item.ident); print_type_params(s, tps); if vec::len(traits) != 0u { - word_space(s, ~":"); - commasep(s, inconsistent, traits, |s, p| - print_path(s, p.path, false)); + word(s.s, ~":"); + for vec::each(traits) |trait_| { + nbsp(s); + print_path(s, trait_.path, false); + } } word(s.s, ~" "); bopen(s);