File tree Expand file tree Collapse file tree 1 file changed +7
-9
lines changed Expand file tree Collapse file tree 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 {
18441844 fields : self
18451845 . fields
18461846 . 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 }
18561854 } )
18571855 . collect ( ) ,
18581856 } ) ,
You can’t perform that action at this time.
0 commit comments