@@ -292,6 +292,23 @@ impl Clean<Vec<Item>> for hir::Item<'_> {
292292 fields : variant_data. fields ( ) . clean ( cx) ,
293293 fields_stripped : false ,
294294 } ) ) ,
295+ ItemKind :: Trait ( is_auto, unsafety, ref generics, bounds, item_ids) => {
296+ let attrs = self . attrs . clean ( cx) ;
297+ let is_spotlight = attrs. has_doc_flag ( sym:: spotlight) ;
298+ NotInlined ( TraitItem ( Trait {
299+ auto : is_auto. clean ( cx) ,
300+ unsafety,
301+ items : item_ids
302+ . iter ( )
303+ . map ( |ti| cx. tcx . hir ( ) . trait_item ( ti. id ) . clean ( cx) )
304+ . collect ( ) ,
305+ generics : generics. clean ( cx) ,
306+ bounds : bounds. clean ( cx) ,
307+ is_spotlight,
308+ // TODO: this is redundant with `auto`
309+ is_auto : is_auto. clean ( cx) ,
310+ } ) )
311+ }
295312 _ => unimplemented ! ( ) ,
296313 } ;
297314
@@ -1125,26 +1142,6 @@ impl Clean<FnRetTy> for hir::FnRetTy<'_> {
11251142 }
11261143}
11271144
1128- impl Clean < Item > for doctree:: Trait < ' _ > {
1129- fn clean ( & self , cx : & DocContext < ' _ > ) -> Item {
1130- let attrs = self . attrs . clean ( cx) ;
1131- let is_spotlight = attrs. has_doc_flag ( sym:: spotlight) ;
1132- Item :: from_hir_id_and_parts (
1133- self . id ,
1134- Some ( self . name ) ,
1135- TraitItem ( Trait {
1136- unsafety : self . unsafety ,
1137- items : self . items . iter ( ) . map ( |ti| ti. clean ( cx) ) . collect ( ) ,
1138- generics : self . generics . clean ( cx) ,
1139- bounds : self . bounds . clean ( cx) ,
1140- is_spotlight,
1141- is_auto : self . is_auto . clean ( cx) ,
1142- } ) ,
1143- cx,
1144- )
1145- }
1146- }
1147-
11481145impl Clean < Item > for doctree:: TraitAlias < ' _ > {
11491146 fn clean ( & self , cx : & DocContext < ' _ > ) -> Item {
11501147 Item :: from_hir_id_and_parts (
0 commit comments