@@ -773,6 +773,7 @@ impl EncodeContext<'a, 'tcx> {
773
773
if should_encode_visibility ( def_kind) {
774
774
record ! ( self . tables. visibility[ def_id] <- self . tcx. visibility( def_id) ) ;
775
775
}
776
+ self . encode_stability ( def_id) ;
776
777
}
777
778
}
778
779
@@ -805,7 +806,6 @@ impl EncodeContext<'a, 'tcx> {
805
806
f. did. index
806
807
} ) ) ;
807
808
self . encode_ident_span ( def_id, variant. ident ) ;
808
- self . encode_stability ( def_id) ;
809
809
self . encode_deprecation ( def_id) ;
810
810
self . encode_item_type ( def_id) ;
811
811
if variant. ctor_kind == CtorKind :: Fn {
@@ -836,7 +836,6 @@ impl EncodeContext<'a, 'tcx> {
836
836
} ;
837
837
838
838
record ! ( self . tables. kind[ def_id] <- EntryKind :: Variant ( self . lazy( data) ) ) ;
839
- self . encode_stability ( def_id) ;
840
839
self . encode_deprecation ( def_id) ;
841
840
self . encode_item_type ( def_id) ;
842
841
if variant. ctor_kind == CtorKind :: Fn {
@@ -893,7 +892,6 @@ impl EncodeContext<'a, 'tcx> {
893
892
tcx. hir( ) . local_def_id( item_id. id) . local_def_index
894
893
} ) ) ;
895
894
}
896
- self . encode_stability ( def_id) ;
897
895
self . encode_deprecation ( def_id) ;
898
896
}
899
897
@@ -911,7 +909,6 @@ impl EncodeContext<'a, 'tcx> {
911
909
912
910
record ! ( self . tables. kind[ def_id] <- EntryKind :: Field ) ;
913
911
self . encode_ident_span ( def_id, field. ident ) ;
914
- self . encode_stability ( def_id) ;
915
912
self . encode_deprecation ( def_id) ;
916
913
self . encode_item_type ( def_id) ;
917
914
self . encode_generics ( def_id) ;
@@ -932,7 +929,6 @@ impl EncodeContext<'a, 'tcx> {
932
929
} ;
933
930
934
931
record ! ( self . tables. kind[ def_id] <- EntryKind :: Struct ( self . lazy( data) , adt_def. repr) ) ;
935
- self . encode_stability ( def_id) ;
936
932
self . encode_deprecation ( def_id) ;
937
933
self . encode_item_type ( def_id) ;
938
934
if variant. ctor_kind == CtorKind :: Fn {
@@ -1035,7 +1031,6 @@ impl EncodeContext<'a, 'tcx> {
1035
1031
}
1036
1032
}
1037
1033
self . encode_ident_span ( def_id, ast_item. ident ) ;
1038
- self . encode_stability ( def_id) ;
1039
1034
self . encode_const_stability ( def_id) ;
1040
1035
self . encode_deprecation ( def_id) ;
1041
1036
match trait_item. kind {
@@ -1136,7 +1131,6 @@ impl EncodeContext<'a, 'tcx> {
1136
1131
}
1137
1132
}
1138
1133
self . encode_ident_span ( def_id, impl_item. ident ) ;
1139
- self . encode_stability ( def_id) ;
1140
1134
self . encode_const_stability ( def_id) ;
1141
1135
self . encode_deprecation ( def_id) ;
1142
1136
self . encode_item_type ( def_id) ;
@@ -1411,7 +1405,6 @@ impl EncodeContext<'a, 'tcx> {
1411
1405
}
1412
1406
_ => { }
1413
1407
}
1414
- self . encode_stability ( def_id) ;
1415
1408
self . encode_const_stability ( def_id) ;
1416
1409
self . encode_deprecation ( def_id) ;
1417
1410
match item. kind {
@@ -1495,7 +1488,6 @@ impl EncodeContext<'a, 'tcx> {
1495
1488
let def_id = self . tcx . hir ( ) . local_def_id ( macro_def. hir_id ) . to_def_id ( ) ;
1496
1489
record ! ( self . tables. kind[ def_id] <- EntryKind :: MacroDef ( self . lazy( macro_def. ast. clone( ) ) ) ) ;
1497
1490
self . encode_ident_span ( def_id, macro_def. ident ) ;
1498
- self . encode_stability ( def_id) ;
1499
1491
self . encode_deprecation ( def_id) ;
1500
1492
}
1501
1493
@@ -1823,7 +1815,6 @@ impl EncodeContext<'a, 'tcx> {
1823
1815
}
1824
1816
}
1825
1817
self . encode_ident_span ( def_id, nitem. ident ) ;
1826
- self . encode_stability ( def_id) ;
1827
1818
self . encode_const_stability ( def_id) ;
1828
1819
self . encode_deprecation ( def_id) ;
1829
1820
self . encode_item_type ( def_id) ;
@@ -1891,15 +1882,12 @@ impl EncodeContext<'a, 'tcx> {
1891
1882
let def_id = self . tcx . hir ( ) . local_def_id ( param. hir_id ) ;
1892
1883
match param. kind {
1893
1884
GenericParamKind :: Lifetime { .. } => continue ,
1894
- GenericParamKind :: Type { ref default, .. } => {
1885
+ GenericParamKind :: Type { default, .. } => {
1895
1886
self . encode_info_for_generic_param (
1896
1887
def_id. to_def_id ( ) ,
1897
1888
EntryKind :: TypeParam ,
1898
1889
default. is_some ( ) ,
1899
1890
) ;
1900
- if default. is_some ( ) {
1901
- self . encode_stability ( def_id. to_def_id ( ) ) ;
1902
- }
1903
1891
}
1904
1892
GenericParamKind :: Const { .. } => {
1905
1893
self . encode_info_for_generic_param (
0 commit comments