@@ -456,23 +456,36 @@ impl fmt::Display for clean::Type {
456
456
decl. decl)
457
457
}
458
458
clean:: Tuple ( ref typs) => {
459
- primitive_link ( f, clean:: PrimitiveTuple ,
460
- & * match & * * typs {
461
- [ ref one] => format ! ( "({},)" , one) ,
462
- many => format ! ( "({})" , CommaSep ( & many) ) ,
463
- } )
459
+ match & * * typs {
460
+ [ ] => primitive_link ( f, clean:: PrimitiveTuple , "()" ) ,
461
+ [ ref one] => {
462
+ try!( primitive_link ( f, clean:: PrimitiveTuple , "(" ) ) ;
463
+ try!( write ! ( f, "{}" , one) ) ;
464
+ primitive_link ( f, clean:: PrimitiveTuple , ")" )
465
+ }
466
+ many => {
467
+ try!( primitive_link ( f, clean:: PrimitiveTuple , "(" ) ) ;
468
+ try!( write ! ( f, "{}" , CommaSep ( & many) ) ) ;
469
+ primitive_link ( f, clean:: PrimitiveTuple , ")" )
470
+ }
471
+ }
464
472
}
465
473
clean:: Vector ( ref t) => {
466
- primitive_link ( f, clean:: Slice , & format ! ( "[{}]" , * * t) )
474
+ try!( primitive_link ( f, clean:: Slice , & format ! ( "[" ) ) ) ;
475
+ try!( write ! ( f, "{}" , t) ) ;
476
+ primitive_link ( f, clean:: Slice , & format ! ( "]" ) )
467
477
}
468
478
clean:: FixedVector ( ref t, ref s) => {
479
+ try!( primitive_link ( f, clean:: PrimitiveType :: Array , "[" ) ) ;
480
+ try!( write ! ( f, "{}" , t) ) ;
469
481
primitive_link ( f, clean:: PrimitiveType :: Array ,
470
- & format ! ( "[{} ; {}]" , * * t , * s) )
482
+ & format ! ( "; {}]" , * s) )
471
483
}
472
484
clean:: Bottom => f. write_str ( "!" ) ,
473
485
clean:: RawPointer ( m, ref t) => {
474
- primitive_link ( f, clean:: PrimitiveType :: PrimitiveRawPointer ,
475
- & format ! ( "*{}{}" , RawMutableSpace ( m) , * * t) )
486
+ try!( primitive_link ( f, clean:: PrimitiveType :: PrimitiveRawPointer ,
487
+ & format ! ( "*{}" , RawMutableSpace ( m) ) ) ) ;
488
+ write ! ( f, "{}" , t)
476
489
}
477
490
clean:: BorrowedRef { lifetime : ref l, mutability, type_ : ref ty} => {
478
491
let lt = match * l {
0 commit comments