@@ -265,7 +265,7 @@ pub(super) fn print_item(cx: &Context<'_>, item: &clean::Item, buf: &mut String)
265
265
format_args ! ( "{}" , item_constant( cx, item, & ci. generics, & ci. type_, & ci. kind) ) ,
266
266
) ,
267
267
clean:: ForeignTypeItem => write_str ( buf, format_args ! ( "{}" , item_foreign_type( cx, item) ) ) ,
268
- clean:: KeywordItem => item_keyword ( buf, cx, item) ,
268
+ clean:: KeywordItem => write_str ( buf, format_args ! ( "{}" , item_keyword ( cx, item) ) ) ,
269
269
clean:: TraitAliasItem ( ref ta) => item_trait_alias ( buf, cx, item, ta) ,
270
270
_ => {
271
271
// We don't generate pages for any other type.
@@ -2142,8 +2142,11 @@ fn item_foreign_type<'a, 'tcx>(
2142
2142
} )
2143
2143
}
2144
2144
2145
- fn item_keyword ( w : & mut String , cx : & Context < ' _ > , it : & clean:: Item ) {
2146
- write_str ( w, format_args ! ( "{}" , document( cx, it, None , HeadingOffset :: H2 ) ) ) ;
2145
+ fn item_keyword < ' a , ' tcx > (
2146
+ cx : & ' a Context < ' tcx > ,
2147
+ it : & ' a clean:: Item ,
2148
+ ) -> impl fmt:: Display + ' a + Captures < ' tcx > {
2149
+ document ( cx, it, None , HeadingOffset :: H2 )
2147
2150
}
2148
2151
2149
2152
/// Compare two strings treating multi-digit numbers as single units (i.e. natural sort order).
0 commit comments