Skip to content

Commit

Permalink
Don't display "Deprecated since" for non-rustc deprecated items
Browse files Browse the repository at this point in the history
  • Loading branch information
varkor committed Feb 11, 2019
1 parent 3737d4d commit 87cd09b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/librustdoc/html/render.rs
Expand Up @@ -2845,8 +2845,10 @@ fn short_stability(item: &clean::Item, cx: &Context) -> Vec<String> {
let mut stability = vec![];
let error_codes = ErrorCodes::from(UnstableFeatures::from_environment().is_nightly_build());

if let Some(Deprecation { since, note }) = &item.deprecation() {
let mut message = if let Some(since) = since {
if let Some(Deprecation { note, .. }) = &item.deprecation() {
// We display deprecation messages for #[deprecated] and #[rustc_deprecated]
// but only display the future-deprecation messages for #[rustc_deprecated].
let mut message = if let Some(since) = item.stability.deprecation.since {
if stability::deprecation_in_effect(since) {
format!("Deprecated since {}", Escape(since))
} else {
Expand Down

0 comments on commit 87cd09b

Please sign in to comment.