File tree 1 file changed +7
-9
lines changed
1 file changed +7
-9
lines changed Original file line number Diff line number Diff line change @@ -1844,15 +1844,13 @@ impl Clean<Item> for ty::VariantDef {
1844
1844
fields : self
1845
1845
. fields
1846
1846
. iter ( )
1847
- . map ( |field| Item {
1848
- source : cx. tcx . def_span ( field. did ) . clean ( cx) ,
1849
- name : Some ( field. ident . name . clean ( cx) ) ,
1850
- attrs : cx. tcx . get_attrs ( field. did ) . clean ( cx) ,
1851
- visibility : Visibility :: Inherited ,
1852
- def_id : field. did ,
1853
- stability : get_stability ( cx, field. did ) ,
1854
- deprecation : get_deprecation ( cx, field. did ) ,
1855
- kind : StructFieldItem ( cx. tcx . type_of ( field. did ) . clean ( cx) ) ,
1847
+ . map ( |field| {
1848
+ let name = Some ( field. ident . name ) ;
1849
+ let kind = StructFieldItem ( cx. tcx . type_of ( field. did ) . clean ( cx) ) ;
1850
+ let what_rustc_thinks =
1851
+ Item :: from_def_id_and_parts ( field. did , name, kind, cx) ;
1852
+ // don't show `pub` for fields, which are always public
1853
+ Item { visibility : Visibility :: Inherited , ..what_rustc_thinks }
1856
1854
} )
1857
1855
. collect ( ) ,
1858
1856
} ) ,
You can’t perform that action at this time.
0 commit comments