Fix pretty-printing of trait constraints

This commit is contained in:
Brian Anderson
2012-12-07 17:55:34 -08:00
parent e5e6d3c43d
commit 87f3ea7705

View File

@@ -564,9 +564,11 @@ fn print_item(s: ps, &&item: @ast::item) {
print_ident(s, item.ident); print_ident(s, item.ident);
print_type_params(s, tps); print_type_params(s, tps);
if vec::len(traits) != 0u { if vec::len(traits) != 0u {
word_space(s, ~":"); word(s.s, ~":");
commasep(s, inconsistent, traits, |s, p| for vec::each(traits) |trait_| {
print_path(s, p.path, false)); nbsp(s);
print_path(s, trait_.path, false);
}
} }
word(s.s, ~" "); word(s.s, ~" ");
bopen(s); bopen(s);