@@ -2817,7 +2817,17 @@ fn stability_tags(item: &clean::Item) -> String {
2817
2817
2818
2818
// The trailing space after each tag is to space it properly against the rest of the docs.
2819
2819
if item. deprecation ( ) . is_some ( ) {
2820
- tags += & tag_html ( "deprecated" , "Deprecated" ) ;
2820
+ let mut message = "Deprecated" ;
2821
+ if let Some ( ref stab) = item. stability {
2822
+ if let Some ( ref depr) = stab. deprecation {
2823
+ if let Some ( ref since) = depr. since {
2824
+ if !stability:: deprecation_in_effect ( & since) {
2825
+ message = "Deprecation planned" ;
2826
+ }
2827
+ }
2828
+ }
2829
+ }
2830
+ tags += & tag_html ( "deprecated" , message) ;
2821
2831
}
2822
2832
2823
2833
if let Some ( stab) = item
@@ -2848,15 +2858,18 @@ fn short_stability(item: &clean::Item, cx: &Context) -> Vec<String> {
2848
2858
if let Some ( Deprecation { note, .. } ) = & item. deprecation ( ) {
2849
2859
// We display deprecation messages for #[deprecated] and #[rustc_deprecated]
2850
2860
// but only display the future-deprecation messages for #[rustc_deprecated].
2851
- let mut message = if let Some ( since) = item. stability . deprecation . since {
2852
- if stability:: deprecation_in_effect ( since) {
2853
- format ! ( "Deprecated since {}" , Escape ( since) )
2854
- } else {
2855
- format ! ( "Deprecating in {}" , Escape ( since) )
2861
+ let mut message = String :: from ( "Deprecated" ) ;
2862
+ if let Some ( ref stab) = item. stability {
2863
+ if let Some ( ref depr) = stab. deprecation {
2864
+ if let Some ( ref since) = depr. since {
2865
+ if stability:: deprecation_in_effect ( & since) {
2866
+ message = format ! ( "Deprecated since {}" , Escape ( & since) ) ;
2867
+ } else {
2868
+ message = format ! ( "Deprecating in {}" , Escape ( & since) ) ;
2869
+ }
2870
+ }
2856
2871
}
2857
- } else {
2858
- String :: from ( "Deprecated" )
2859
- } ;
2872
+ }
2860
2873
2861
2874
if let Some ( note) = note {
2862
2875
let mut ids = cx. id_map . borrow_mut ( ) ;
0 commit comments