@@ -3117,23 +3117,20 @@ fn item_trait(
3117
3117
// FIXME: we should be using a derived_id for the Anchors here
3118
3118
write ! ( w, "{{\n " ) ?;
3119
3119
for t in & types {
3120
- write ! ( w, " " ) ?;
3121
3120
render_assoc_item ( w, t, AssocItemLink :: Anchor ( None ) , ItemType :: Trait ) ?;
3122
3121
write ! ( w, ";\n " ) ?;
3123
3122
}
3124
3123
if !types. is_empty ( ) && !consts. is_empty ( ) {
3125
3124
w. write_str ( "\n " ) ?;
3126
3125
}
3127
3126
for t in & consts {
3128
- write ! ( w, " " ) ?;
3129
3127
render_assoc_item ( w, t, AssocItemLink :: Anchor ( None ) , ItemType :: Trait ) ?;
3130
3128
write ! ( w, ";\n " ) ?;
3131
3129
}
3132
3130
if !consts. is_empty ( ) && !required. is_empty ( ) {
3133
3131
w. write_str ( "\n " ) ?;
3134
3132
}
3135
3133
for ( pos, m) in required. iter ( ) . enumerate ( ) {
3136
- write ! ( w, " " ) ?;
3137
3134
render_assoc_item ( w, m, AssocItemLink :: Anchor ( None ) , ItemType :: Trait ) ?;
3138
3135
write ! ( w, ";\n " ) ?;
3139
3136
@@ -3145,7 +3142,6 @@ fn item_trait(
3145
3142
w. write_str ( "\n " ) ?;
3146
3143
}
3147
3144
for ( pos, m) in provided. iter ( ) . enumerate ( ) {
3148
- write ! ( w, " " ) ?;
3149
3145
render_assoc_item ( w, m, AssocItemLink :: Anchor ( None ) , ItemType :: Trait ) ?;
3150
3146
match m. inner {
3151
3147
clean:: MethodItem ( ref inner) if !inner. generics . where_predicates . is_empty ( ) => {
@@ -3454,8 +3450,9 @@ fn render_assoc_item(w: &mut fmt::Formatter<'_>,
3454
3450
( 0 , true )
3455
3451
} ;
3456
3452
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>\
3458
3454
{generics}{decl}{where_clause}",
3455
+ if parent == ItemType :: Trait { " " } else { "" } ,
3459
3456
VisSpace ( & meth. visibility) ,
3460
3457
ConstnessSpace ( header. constness) ,
3461
3458
UnsafetySpace ( header. unsafety) ,
@@ -3755,7 +3752,7 @@ const ATTRIBUTE_WHITELIST: &'static [&'static str] = &[
3755
3752
"non_exhaustive"
3756
3753
] ;
3757
3754
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 {
3759
3756
let mut attrs = String :: new ( ) ;
3760
3757
3761
3758
for attr in & it. attrs . other_attrs {
0 commit comments