We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 436a90e commit 99a5715Copy full SHA for 99a5715
src/libsyntax/print/pprust.rs
@@ -496,19 +496,20 @@ fn print_item(s: ps, &&item: @ast::item) {
496
}
497
ast::item_impl(tps, traits, ty, methods) => {
498
head(s, ~"impl");
499
- word(s.s, *item.ident);
500
- print_type_params(s, tps);
501
- space(s.s);
+ if tps.is_not_empty() {
+ print_type_params(s, tps);
+ space(s.s);
502
+ }
503
+ print_type(s, ty);
504
+
505
if vec::len(traits) != 0u {
- word_nbsp(s, ~"of");
506
+ word_space(s, ~":");
507
do commasep(s, inconsistent, traits) |s, p| {
508
print_path(s, p.path, false);
509
510
- word_nbsp(s, ~"for");
- print_type(s, ty);
511
space(s.s);
512
513
bopen(s);
514
for methods.each |meth| {
515
print_method(s, meth);
0 commit comments