@@ -171,13 +171,6 @@ impl<'a, 'tcx: 'a> Annotator<'a, 'tcx> {
171
171
attr:: mark_used ( attr) ;
172
172
self . tcx . sess . span_err ( attr. span ( ) , "stability attributes may not be used \
173
173
outside of the standard library") ;
174
- } else if tag == "deprecated" {
175
- if !self . tcx . sess . features . borrow ( ) . deprecated {
176
- self . tcx . sess . span_err ( attr. span ( ) ,
177
- "`#[deprecated]` attribute is unstable" ) ;
178
- fileline_help ! ( self . tcx. sess, attr. span( ) , "add #![feature(deprecated)] to \
179
- the crate features to enable") ;
180
- }
181
174
}
182
175
}
183
176
@@ -687,68 +680,20 @@ pub fn lookup_deprecation<'tcx>(tcx: &ty::ctxt<'tcx>, id: DefId) -> Option<Depre
687
680
688
681
fn lookup_stability_uncached < ' tcx > ( tcx : & ty:: ctxt < ' tcx > , id : DefId ) -> Option < & ' tcx Stability > {
689
682
debug ! ( "lookup(id={:?})" , id) ;
690
-
691
- // is this definition the implementation of a trait method?
692
- match tcx. trait_item_of_item ( id) {
693
- Some ( ty:: MethodTraitItemId ( trait_method_id) ) if trait_method_id != id => {
694
- debug ! ( "lookup: trait_method_id={:?}" , trait_method_id) ;
695
- return lookup_stability ( tcx, trait_method_id)
696
- }
697
- _ => { }
698
- }
699
-
700
- let item_stab = if id. is_local ( ) {
683
+ if id. is_local ( ) {
701
684
None // The stability cache is filled partially lazily
702
685
} else {
703
686
tcx. sess . cstore . stability ( id) . map ( |st| tcx. intern_stability ( st) )
704
- } ;
705
-
706
- item_stab. or_else ( || {
707
- if tcx. is_impl ( id) {
708
- if let Some ( trait_id) = tcx. trait_id_of_impl ( id) {
709
- // FIXME (#18969): for the time being, simply use the
710
- // stability of the trait to determine the stability of any
711
- // unmarked impls for it. See FIXME above for more details.
712
-
713
- debug ! ( "lookup: trait_id={:?}" , trait_id) ;
714
- return lookup_stability ( tcx, trait_id) ;
715
- }
716
- }
717
- None
718
- } )
687
+ }
719
688
}
720
689
721
690
fn lookup_deprecation_uncached < ' tcx > ( tcx : & ty:: ctxt < ' tcx > , id : DefId ) -> Option < Deprecation > {
722
691
debug ! ( "lookup(id={:?})" , id) ;
723
-
724
- // is this definition the implementation of a trait method?
725
- match tcx. trait_item_of_item ( id) {
726
- Some ( ty:: MethodTraitItemId ( trait_method_id) ) if trait_method_id != id => {
727
- debug ! ( "lookup: trait_method_id={:?}" , trait_method_id) ;
728
- return lookup_deprecation ( tcx, trait_method_id)
729
- }
730
- _ => { }
731
- }
732
-
733
- let item_depr = if id. is_local ( ) {
692
+ if id. is_local ( ) {
734
693
None // The stability cache is filled partially lazily
735
694
} else {
736
695
tcx. sess . cstore . deprecation ( id)
737
- } ;
738
-
739
- item_depr. or_else ( || {
740
- if tcx. is_impl ( id) {
741
- if let Some ( trait_id) = tcx. trait_id_of_impl ( id) {
742
- // FIXME (#18969): for the time being, simply use the
743
- // stability of the trait to determine the stability of any
744
- // unmarked impls for it. See FIXME above for more details.
745
-
746
- debug ! ( "lookup: trait_id={:?}" , trait_id) ;
747
- return lookup_deprecation ( tcx, trait_id) ;
748
- }
749
- }
750
- None
751
- } )
696
+ }
752
697
}
753
698
754
699
/// Given the list of enabled features that were not language features (i.e. that
0 commit comments