@@ -3117,23 +3117,20 @@ fn item_trait(
31173117 // FIXME: we should be using a derived_id for the Anchors here
31183118 write ! ( w, "{{\n " ) ?;
31193119 for t in & types {
3120- write ! ( w, " " ) ?;
31213120 render_assoc_item ( w, t, AssocItemLink :: Anchor ( None ) , ItemType :: Trait ) ?;
31223121 write ! ( w, ";\n " ) ?;
31233122 }
31243123 if !types. is_empty ( ) && !consts. is_empty ( ) {
31253124 w. write_str ( "\n " ) ?;
31263125 }
31273126 for t in & consts {
3128- write ! ( w, " " ) ?;
31293127 render_assoc_item ( w, t, AssocItemLink :: Anchor ( None ) , ItemType :: Trait ) ?;
31303128 write ! ( w, ";\n " ) ?;
31313129 }
31323130 if !consts. is_empty ( ) && !required. is_empty ( ) {
31333131 w. write_str ( "\n " ) ?;
31343132 }
31353133 for ( pos, m) in required. iter ( ) . enumerate ( ) {
3136- write ! ( w, " " ) ?;
31373134 render_assoc_item ( w, m, AssocItemLink :: Anchor ( None ) , ItemType :: Trait ) ?;
31383135 write ! ( w, ";\n " ) ?;
31393136
@@ -3145,7 +3142,6 @@ fn item_trait(
31453142 w. write_str ( "\n " ) ?;
31463143 }
31473144 for ( pos, m) in provided. iter ( ) . enumerate ( ) {
3148- write ! ( w, " " ) ?;
31493145 render_assoc_item ( w, m, AssocItemLink :: Anchor ( None ) , ItemType :: Trait ) ?;
31503146 match m. inner {
31513147 clean:: MethodItem ( ref inner) if !inner. generics . where_predicates . is_empty ( ) => {
@@ -3454,8 +3450,9 @@ fn render_assoc_item(w: &mut fmt::Formatter<'_>,
34543450 ( 0 , true )
34553451 } ;
34563452 render_attributes ( w, meth) ?;
3457- write ! ( w, "{}{}{}{}{}{}fn <a href='{href}' class='fnname'>{name}</a>\
3453+ write ! ( w, "{}{}{}{}{}{}{} fn <a href='{href}' class='fnname'>{name}</a>\
34583454 {generics}{decl}{where_clause}",
3455+ if parent == ItemType :: Trait { " " } else { "" } ,
34593456 VisSpace ( & meth. visibility) ,
34603457 ConstnessSpace ( header. constness) ,
34613458 UnsafetySpace ( header. unsafety) ,
@@ -3755,7 +3752,7 @@ const ATTRIBUTE_WHITELIST: &'static [&'static str] = &[
37553752 "non_exhaustive"
37563753] ;
37573754
3758- fn render_attributes ( w : & mut fmt:: Formatter < ' _ > , it : & clean:: Item ) -> fmt:: Result {
3755+ fn render_attributes ( w : & mut dyn fmt:: Write , it : & clean:: Item ) -> fmt:: Result {
37593756 let mut attrs = String :: new ( ) ;
37603757
37613758 for attr in & it. attrs . other_attrs {
0 commit comments