@@ -1925,7 +1925,7 @@ fn clean_maybe_renamed_item<'tcx>(
1925
1925
} ) )
1926
1926
}
1927
1927
ItemKind :: Enum ( ref def, generics) => EnumItem ( Enum {
1928
- variants : def. variants . iter ( ) . map ( |v| v . clean ( cx) ) . collect ( ) ,
1928
+ variants : def. variants . iter ( ) . map ( |v| clean_variant ( v , cx) ) . collect ( ) ,
1929
1929
generics : clean_generics ( generics, cx) ,
1930
1930
} ) ,
1931
1931
ItemKind :: TraitAlias ( generics, bounds) => TraitAliasItem ( TraitAlias {
@@ -1978,14 +1978,12 @@ fn clean_maybe_renamed_item<'tcx>(
1978
1978
} )
1979
1979
}
1980
1980
1981
- impl < ' tcx > Clean < ' tcx , Item > for hir:: Variant < ' tcx > {
1982
- fn clean ( & self , cx : & mut DocContext < ' tcx > ) -> Item {
1983
- let kind = VariantItem ( clean_variant_data ( & self . data , cx) ) ;
1984
- let what_rustc_thinks =
1985
- Item :: from_hir_id_and_parts ( self . id , Some ( self . ident . name ) , kind, cx) ;
1986
- // don't show `pub` for variants, which are always public
1987
- Item { visibility : Inherited , ..what_rustc_thinks }
1988
- }
1981
+ fn clean_variant < ' tcx > ( variant : & hir:: Variant < ' tcx > , cx : & mut DocContext < ' tcx > ) -> Item {
1982
+ let kind = VariantItem ( clean_variant_data ( & variant. data , cx) ) ;
1983
+ let what_rustc_thinks =
1984
+ Item :: from_hir_id_and_parts ( variant. id , Some ( variant. ident . name ) , kind, cx) ;
1985
+ // don't show `pub` for variants, which are always public
1986
+ Item { visibility : Inherited , ..what_rustc_thinks }
1989
1987
}
1990
1988
1991
1989
fn clean_impl < ' tcx > (
0 commit comments