@@ -775,6 +775,7 @@ impl EncodeContext<'a, 'tcx> {
775775 }
776776 self . encode_stability ( def_id) ;
777777 self . encode_const_stability ( def_id) ;
778+ self . encode_deprecation ( def_id) ;
778779 }
779780 }
780781
@@ -807,7 +808,6 @@ impl EncodeContext<'a, 'tcx> {
807808 f. did. index
808809 } ) ) ;
809810 self . encode_ident_span ( def_id, variant. ident ) ;
810- self . encode_deprecation ( def_id) ;
811811 self . encode_item_type ( def_id) ;
812812 if variant. ctor_kind == CtorKind :: Fn {
813813 // FIXME(eddyb) encode signature only in `encode_enum_variant_ctor`.
@@ -837,7 +837,6 @@ impl EncodeContext<'a, 'tcx> {
837837 } ;
838838
839839 record ! ( self . tables. kind[ def_id] <- EntryKind :: Variant ( self . lazy( data) ) ) ;
840- self . encode_deprecation ( def_id) ;
841840 self . encode_item_type ( def_id) ;
842841 if variant. ctor_kind == CtorKind :: Fn {
843842 record ! ( self . tables. fn_sig[ def_id] <- tcx. fn_sig( def_id) ) ;
@@ -893,7 +892,6 @@ impl EncodeContext<'a, 'tcx> {
893892 tcx. hir( ) . local_def_id( item_id. id) . local_def_index
894893 } ) ) ;
895894 }
896- self . encode_deprecation ( def_id) ;
897895 }
898896
899897 fn encode_field (
@@ -910,7 +908,6 @@ impl EncodeContext<'a, 'tcx> {
910908
911909 record ! ( self . tables. kind[ def_id] <- EntryKind :: Field ) ;
912910 self . encode_ident_span ( def_id, field. ident ) ;
913- self . encode_deprecation ( def_id) ;
914911 self . encode_item_type ( def_id) ;
915912 self . encode_generics ( def_id) ;
916913 self . encode_explicit_predicates ( def_id) ;
@@ -930,7 +927,6 @@ impl EncodeContext<'a, 'tcx> {
930927 } ;
931928
932929 record ! ( self . tables. kind[ def_id] <- EntryKind :: Struct ( self . lazy( data) , adt_def. repr) ) ;
933- self . encode_deprecation ( def_id) ;
934930 self . encode_item_type ( def_id) ;
935931 if variant. ctor_kind == CtorKind :: Fn {
936932 record ! ( self . tables. fn_sig[ def_id] <- tcx. fn_sig( def_id) ) ;
@@ -1032,7 +1028,6 @@ impl EncodeContext<'a, 'tcx> {
10321028 }
10331029 }
10341030 self . encode_ident_span ( def_id, ast_item. ident ) ;
1035- self . encode_deprecation ( def_id) ;
10361031 match trait_item. kind {
10371032 ty:: AssocKind :: Const | ty:: AssocKind :: Fn => {
10381033 self . encode_item_type ( def_id) ;
@@ -1131,7 +1126,6 @@ impl EncodeContext<'a, 'tcx> {
11311126 }
11321127 }
11331128 self . encode_ident_span ( def_id, impl_item. ident ) ;
1134- self . encode_deprecation ( def_id) ;
11351129 self . encode_item_type ( def_id) ;
11361130 if impl_item. kind == ty:: AssocKind :: Fn {
11371131 record ! ( self . tables. fn_sig[ def_id] <- tcx. fn_sig( def_id) ) ;
@@ -1404,7 +1398,6 @@ impl EncodeContext<'a, 'tcx> {
14041398 }
14051399 _ => { }
14061400 }
1407- self . encode_deprecation ( def_id) ;
14081401 match item. kind {
14091402 hir:: ItemKind :: Static ( ..)
14101403 | hir:: ItemKind :: Const ( ..)
@@ -1486,7 +1479,6 @@ impl EncodeContext<'a, 'tcx> {
14861479 let def_id = self . tcx . hir ( ) . local_def_id ( macro_def. hir_id ) . to_def_id ( ) ;
14871480 record ! ( self . tables. kind[ def_id] <- EntryKind :: MacroDef ( self . lazy( macro_def. ast. clone( ) ) ) ) ;
14881481 self . encode_ident_span ( def_id, macro_def. ident ) ;
1489- self . encode_deprecation ( def_id) ;
14901482 }
14911483
14921484 fn encode_info_for_generic_param ( & mut self , def_id : DefId , kind : EntryKind , encode_type : bool ) {
@@ -1813,7 +1805,6 @@ impl EncodeContext<'a, 'tcx> {
18131805 }
18141806 }
18151807 self . encode_ident_span ( def_id, nitem. ident ) ;
1816- self . encode_deprecation ( def_id) ;
18171808 self . encode_item_type ( def_id) ;
18181809 self . encode_inherent_implementations ( def_id) ;
18191810 if let hir:: ForeignItemKind :: Fn ( ..) = nitem. kind {
0 commit comments