Skip to content

Commit 886d3f4

Browse files
authored
Rollup merge of rust-lang#72014 - GuillaumeGomez:deprecated-emoji, r=kinnison,ollie27
Deprecated emoji Fixes rust-lang#67872. r? @kinnison cc @rust-lang/rustdoc
2 parents af700fb + 9d83108 commit 886d3f4

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

src/librustdoc/html/render.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -2281,7 +2281,10 @@ fn short_stability(item: &clean::Item, cx: &Context) -> Vec<String> {
22812281
);
22822282
message.push_str(&format!(": {}", html.to_string()));
22832283
}
2284-
stability.push(format!("<div class='stab deprecated'>{}</div>", message));
2284+
stability.push(format!(
2285+
"<div class='stab deprecated'><span class='emoji'>👎</span> {}</div>",
2286+
message,
2287+
));
22852288
}
22862289

22872290
if let Some(stab) = item.stability.as_ref().filter(|stab| stab.level == stability::Unstable) {

src/test/rustdoc/issue-32374.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
// @matches issue_32374/index.html '//*[@class="docblock-short"]/text()' 'Docs'
1111

1212
// @has issue_32374/struct.T.html '//*[@class="stab deprecated"]' \
13-
// 'Deprecated since 1.0.0: text'
13+
// '👎 Deprecated since 1.0.0: text'
1414
// @has - '<code>test</code>&nbsp;<a href="http://issue_url/32374">#32374</a>'
1515
// @matches issue_32374/struct.T.html '//*[@class="stab unstable"]' \
1616
// '🔬 This is a nightly-only experimental API. \(test\s#32374\)$'
@@ -20,7 +20,7 @@
2020
pub struct T;
2121

2222
// @has issue_32374/struct.U.html '//*[@class="stab deprecated"]' \
23-
// 'Deprecated since 1.0.0: deprecated'
23+
// '👎 Deprecated since 1.0.0: deprecated'
2424
// @has issue_32374/struct.U.html '//*[@class="stab unstable"]' \
2525
// '🔬 This is a nightly-only experimental API. (test #32374)'
2626
// @has issue_32374/struct.U.html '//details' \

0 commit comments

Comments
 (0)