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> {
28452845 let mut stability = vec ! [ ] ;
28462846 let error_codes = ErrorCodes :: from ( UnstableFeatures :: from_environment ( ) . is_nightly_build ( ) ) ;
28472847
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 {
28502852 if stability:: deprecation_in_effect ( since) {
28512853 format ! ( "Deprecated since {}" , Escape ( since) )
28522854 } else {
You can’t perform that action at this time.
0 commit comments