@@ -775,6 +775,7 @@ impl EncodeContext<'a, 'tcx> {
775
775
}
776
776
self . encode_stability ( def_id) ;
777
777
self . encode_const_stability ( def_id) ;
778
+ self . encode_deprecation ( def_id) ;
778
779
}
779
780
}
780
781
@@ -807,7 +808,6 @@ impl EncodeContext<'a, 'tcx> {
807
808
f. did. index
808
809
} ) ) ;
809
810
self . encode_ident_span ( def_id, variant. ident ) ;
810
- self . encode_deprecation ( def_id) ;
811
811
self . encode_item_type ( def_id) ;
812
812
if variant. ctor_kind == CtorKind :: Fn {
813
813
// FIXME(eddyb) encode signature only in `encode_enum_variant_ctor`.
@@ -837,7 +837,6 @@ impl EncodeContext<'a, 'tcx> {
837
837
} ;
838
838
839
839
record ! ( self . tables. kind[ def_id] <- EntryKind :: Variant ( self . lazy( data) ) ) ;
840
- self . encode_deprecation ( def_id) ;
841
840
self . encode_item_type ( def_id) ;
842
841
if variant. ctor_kind == CtorKind :: Fn {
843
842
record ! ( self . tables. fn_sig[ def_id] <- tcx. fn_sig( def_id) ) ;
@@ -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_deprecation ( def_id) ;
897
895
}
898
896
899
897
fn encode_field (
@@ -910,7 +908,6 @@ impl EncodeContext<'a, 'tcx> {
910
908
911
909
record ! ( self . tables. kind[ def_id] <- EntryKind :: Field ) ;
912
910
self . encode_ident_span ( def_id, field. ident ) ;
913
- self . encode_deprecation ( def_id) ;
914
911
self . encode_item_type ( def_id) ;
915
912
self . encode_generics ( def_id) ;
916
913
self . encode_explicit_predicates ( def_id) ;
@@ -930,7 +927,6 @@ impl EncodeContext<'a, 'tcx> {
930
927
} ;
931
928
932
929
record ! ( self . tables. kind[ def_id] <- EntryKind :: Struct ( self . lazy( data) , adt_def. repr) ) ;
933
- self . encode_deprecation ( def_id) ;
934
930
self . encode_item_type ( def_id) ;
935
931
if variant. ctor_kind == CtorKind :: Fn {
936
932
record ! ( self . tables. fn_sig[ def_id] <- tcx. fn_sig( def_id) ) ;
@@ -1032,7 +1028,6 @@ impl EncodeContext<'a, 'tcx> {
1032
1028
}
1033
1029
}
1034
1030
self . encode_ident_span ( def_id, ast_item. ident ) ;
1035
- self . encode_deprecation ( def_id) ;
1036
1031
match trait_item. kind {
1037
1032
ty:: AssocKind :: Const | ty:: AssocKind :: Fn => {
1038
1033
self . encode_item_type ( def_id) ;
@@ -1131,7 +1126,6 @@ impl EncodeContext<'a, 'tcx> {
1131
1126
}
1132
1127
}
1133
1128
self . encode_ident_span ( def_id, impl_item. ident ) ;
1134
- self . encode_deprecation ( def_id) ;
1135
1129
self . encode_item_type ( def_id) ;
1136
1130
if impl_item. kind == ty:: AssocKind :: Fn {
1137
1131
record ! ( self . tables. fn_sig[ def_id] <- tcx. fn_sig( def_id) ) ;
@@ -1404,7 +1398,6 @@ impl EncodeContext<'a, 'tcx> {
1404
1398
}
1405
1399
_ => { }
1406
1400
}
1407
- self . encode_deprecation ( def_id) ;
1408
1401
match item. kind {
1409
1402
hir:: ItemKind :: Static ( ..)
1410
1403
| hir:: ItemKind :: Const ( ..)
@@ -1486,7 +1479,6 @@ impl EncodeContext<'a, 'tcx> {
1486
1479
let def_id = self . tcx . hir ( ) . local_def_id ( macro_def. hir_id ) . to_def_id ( ) ;
1487
1480
record ! ( self . tables. kind[ def_id] <- EntryKind :: MacroDef ( self . lazy( macro_def. ast. clone( ) ) ) ) ;
1488
1481
self . encode_ident_span ( def_id, macro_def. ident ) ;
1489
- self . encode_deprecation ( def_id) ;
1490
1482
}
1491
1483
1492
1484
fn encode_info_for_generic_param ( & mut self , def_id : DefId , kind : EntryKind , encode_type : bool ) {
@@ -1813,7 +1805,6 @@ impl EncodeContext<'a, 'tcx> {
1813
1805
}
1814
1806
}
1815
1807
self . encode_ident_span ( def_id, nitem. ident ) ;
1816
- self . encode_deprecation ( def_id) ;
1817
1808
self . encode_item_type ( def_id) ;
1818
1809
self . encode_inherent_implementations ( def_id) ;
1819
1810
if let hir:: ForeignItemKind :: Fn ( ..) = nitem. kind {
0 commit comments