@@ -265,7 +265,7 @@ pub(super) fn print_item(cx: &Context<'_>, item: &clean::Item, buf: &mut String)
265265 format_args ! ( "{}" , item_constant( cx, item, & ci. generics, & ci. type_, & ci. kind) ) ,
266266 ) ,
267267 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) ) ) ,
269269 clean:: TraitAliasItem ( ref ta) => item_trait_alias ( buf, cx, item, ta) ,
270270 _ => {
271271 // We don't generate pages for any other type.
@@ -2142,8 +2142,11 @@ fn item_foreign_type<'a, 'tcx>(
21422142 } )
21432143}
21442144
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 )
21472150}
21482151
21492152/// Compare two strings treating multi-digit numbers as single units (i.e. natural sort order).
0 commit comments