@@ -1840,11 +1840,11 @@ impl Clean<VariantStruct> for rustc_hir::VariantData<'_> {
1840
1840
impl Clean < Item > for ty:: VariantDef {
1841
1841
fn clean ( & self , cx : & DocContext < ' _ > ) -> Item {
1842
1842
let kind = match self . ctor_kind {
1843
- CtorKind :: Const => VariantKind :: CLike ,
1844
- CtorKind :: Fn => VariantKind :: Tuple (
1843
+ CtorKind :: Const => Variant :: CLike ,
1844
+ CtorKind :: Fn => Variant :: Tuple (
1845
1845
self . fields . iter ( ) . map ( |f| cx. tcx . type_of ( f. did ) . clean ( cx) ) . collect ( ) ,
1846
1846
) ,
1847
- CtorKind :: Fictive => VariantKind :: Struct ( VariantStruct {
1847
+ CtorKind :: Fictive => Variant :: Struct ( VariantStruct {
1848
1848
struct_type : doctree:: Plain ,
1849
1849
fields_stripped : false ,
1850
1850
fields : self
@@ -1861,25 +1861,21 @@ impl Clean<Item> for ty::VariantDef {
1861
1861
. collect ( ) ,
1862
1862
} ) ,
1863
1863
} ;
1864
- let what_rustc_thinks = Item :: from_def_id_and_parts (
1865
- self . def_id ,
1866
- Some ( self . ident . name ) ,
1867
- VariantItem ( Variant { kind } ) ,
1868
- cx,
1869
- ) ;
1864
+ let what_rustc_thinks =
1865
+ Item :: from_def_id_and_parts ( self . def_id , Some ( self . ident . name ) , VariantItem ( kind) , cx) ;
1870
1866
// don't show `pub` for fields, which are always public
1871
1867
Item { visibility : Inherited , ..what_rustc_thinks }
1872
1868
}
1873
1869
}
1874
1870
1875
- impl Clean < VariantKind > for hir:: VariantData < ' _ > {
1876
- fn clean ( & self , cx : & DocContext < ' _ > ) -> VariantKind {
1871
+ impl Clean < Variant > for hir:: VariantData < ' _ > {
1872
+ fn clean ( & self , cx : & DocContext < ' _ > ) -> Variant {
1877
1873
match self {
1878
- hir:: VariantData :: Struct ( ..) => VariantKind :: Struct ( self . clean ( cx) ) ,
1874
+ hir:: VariantData :: Struct ( ..) => Variant :: Struct ( self . clean ( cx) ) ,
1879
1875
hir:: VariantData :: Tuple ( ..) => {
1880
- VariantKind :: Tuple ( self . fields ( ) . iter ( ) . map ( |x| x. ty . clean ( cx) ) . collect ( ) )
1876
+ Variant :: Tuple ( self . fields ( ) . iter ( ) . map ( |x| x. ty . clean ( cx) ) . collect ( ) )
1881
1877
}
1882
- hir:: VariantData :: Unit ( ..) => VariantKind :: CLike ,
1878
+ hir:: VariantData :: Unit ( ..) => Variant :: CLike ,
1883
1879
}
1884
1880
}
1885
1881
}
@@ -2048,7 +2044,7 @@ impl Clean<Vec<Item>> for (&hir::Item<'_>, Option<Symbol>) {
2048
2044
2049
2045
impl Clean < Item > for hir:: Variant < ' _ > {
2050
2046
fn clean ( & self , cx : & DocContext < ' _ > ) -> Item {
2051
- let kind = VariantItem ( Variant { kind : self . data . clean ( cx) } ) ;
2047
+ let kind = VariantItem ( self . data . clean ( cx) ) ;
2052
2048
let what_rustc_thinks =
2053
2049
Item :: from_hir_id_and_parts ( self . id , Some ( self . ident . name ) , kind, cx) ;
2054
2050
// don't show `pub` for variants, which are always public
0 commit comments