Add future deprecation warning to rustdoc
This commit is contained in:
parent
c08902b084
commit
ecaf1f57ea
2 changed files with 43 additions and 27 deletions
|
@ -2108,9 +2108,15 @@ fn short_stability(item: &clean::Item, cx: &Context, show_reason: bool) -> Vec<S
|
|||
} else {
|
||||
String::new()
|
||||
};
|
||||
let text = format!("Deprecated{}{}",
|
||||
since,
|
||||
MarkdownHtml(&deprecated_reason));
|
||||
let text = if stability::deprecation_in_effect(&stab.deprecated_since) {
|
||||
format!("Deprecated{}{}",
|
||||
since,
|
||||
MarkdownHtml(&deprecated_reason))
|
||||
} else {
|
||||
format!("This will be deprecated in {}{}",
|
||||
Escape(&stab.deprecated_since),
|
||||
MarkdownHtml(&deprecated_reason))
|
||||
};
|
||||
stability.push(format!("<div class='stab deprecated'>{}</div>", text))
|
||||
};
|
||||
|
||||
|
@ -2160,7 +2166,15 @@ fn short_stability(item: &clean::Item, cx: &Context, show_reason: bool) -> Vec<S
|
|||
String::new()
|
||||
};
|
||||
|
||||
let text = format!("Deprecated{}{}", since, MarkdownHtml(¬e));
|
||||
let text = if stability::deprecation_in_effect(&depr.since) {
|
||||
format!("Deprecated{}{}",
|
||||
since,
|
||||
MarkdownHtml(¬e))
|
||||
} else {
|
||||
format!("This will be deprecated in {}{}",
|
||||
Escape(&depr.since),
|
||||
MarkdownHtml(¬e))
|
||||
};
|
||||
stability.push(format!("<div class='stab deprecated'>{}</div>", text))
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue