Add future deprecation warning to rustdoc
This commit is contained in:
@@ -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))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user