File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -2845,8 +2845,10 @@ fn short_stability(item: &clean::Item, cx: &Context) -> Vec<String> {
2845
2845
let mut stability = vec ! [ ] ;
2846
2846
let error_codes = ErrorCodes :: from ( UnstableFeatures :: from_environment ( ) . is_nightly_build ( ) ) ;
2847
2847
2848
- if let Some ( Deprecation { since, note } ) = & item. deprecation ( ) {
2849
- let mut message = if let Some ( since) = since {
2848
+ if let Some ( Deprecation { note, .. } ) = & item. deprecation ( ) {
2849
+ // We display deprecation messages for #[deprecated] and #[rustc_deprecated]
2850
+ // but only display the future-deprecation messages for #[rustc_deprecated].
2851
+ let mut message = if let Some ( since) = item. stability . deprecation . since {
2850
2852
if stability:: deprecation_in_effect ( since) {
2851
2853
format ! ( "Deprecated since {}" , Escape ( since) )
2852
2854
} else {
You can’t perform that action at this time.
0 commit comments