@@ -1892,18 +1892,11 @@ impl<'tcx> Clean<Item> for ty::VariantDefData<'tcx, 'static> {
1892
1892
Item {
1893
1893
source : Span :: empty ( ) ,
1894
1894
name : Some ( field. name . clean ( cx) ) ,
1895
- attrs : Vec :: new ( ) ,
1895
+ attrs : cx . tcx ( ) . get_attrs ( field . did ) . clean ( cx ) ,
1896
1896
visibility : Some ( field. vis ) ,
1897
- // FIXME: this is not accurate, we need an id for
1898
- // the specific field but we're using the id
1899
- // for the whole variant. Thus we read the
1900
- // stability from the whole variant as well.
1901
- // Struct variants are experimental and need
1902
- // more infrastructure work before we can get
1903
- // at the needed information here.
1904
- def_id : self . did ,
1905
- stability : get_stability ( cx, self . did ) ,
1906
- deprecation : get_deprecation ( cx, self . did ) ,
1897
+ def_id : field. did ,
1898
+ stability : get_stability ( cx, field. did ) ,
1899
+ deprecation : get_deprecation ( cx, field. did ) ,
1907
1900
inner : StructFieldItem (
1908
1901
TypedStructField ( field. unsubst_ty ( ) . clean ( cx) )
1909
1902
)
@@ -1916,7 +1909,7 @@ impl<'tcx> Clean<Item> for ty::VariantDefData<'tcx, 'static> {
1916
1909
name : Some ( self . name . clean ( cx) ) ,
1917
1910
attrs : inline:: load_attrs ( cx, cx. tcx ( ) , self . did ) ,
1918
1911
source : Span :: empty ( ) ,
1919
- visibility : Some ( hir:: Public ) ,
1912
+ visibility : Some ( hir:: Inherited ) ,
1920
1913
def_id : self . did ,
1921
1914
inner : VariantItem ( Variant { kind : kind } ) ,
1922
1915
stability : get_stability ( cx, self . did ) ,
0 commit comments