@@ -456,23 +456,36 @@ impl fmt::Display for clean::Type {
456456 decl. decl)
457457 }
458458 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+ }
464472 }
465473 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 ! ( "]" ) )
467477 }
468478 clean:: FixedVector ( ref t, ref s) => {
479+ try!( primitive_link ( f, clean:: PrimitiveType :: Array , "[" ) ) ;
480+ try!( write ! ( f, "{}" , t) ) ;
469481 primitive_link ( f, clean:: PrimitiveType :: Array ,
470- & format ! ( "[{} ; {}]" , * * t , * s) )
482+ & format ! ( "; {}]" , * s) )
471483 }
472484 clean:: Bottom => f. write_str ( "!" ) ,
473485 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)
476489 }
477490 clean:: BorrowedRef { lifetime : ref l, mutability, type_ : ref ty} => {
478491 let lt = match * l {
0 commit comments