diff options
| author | Dylan DPC <dylan.dpc@gmail.com> | 2020-05-11 22:20:51 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-05-11 22:20:51 +0200 |
| commit | dd595fade53937fafe3940c83293654e77c78d8f (patch) | |
| tree | 0f4009cc63a977d59690af82f46b9fa5543dbd28 | |
| parent | 99cb9ccb9ca2067ad6e60508e3d52da77396b2f1 (diff) | |
| parent | 9d8310856b3a42aa99d6591244a6679284011dc9 (diff) | |
Rollup merge of #72014 - GuillaumeGomez:deprecated-emoji, r=kinnison,ollie27
Deprecated emoji Fixes #67872. r? @kinnison cc @rust-lang/rustdoc
| -rw-r--r-- | src/librustdoc/html/render.rs | 5 | ||||
| -rw-r--r-- | src/test/rustdoc/issue-32374.rs | 4 |
2 files changed, 6 insertions, 3 deletions
diff --git a/src/librustdoc/html/render.rs b/src/librustdoc/html/render.rs index 4ad9651d563..eecffc5bb9f 100644 --- a/src/librustdoc/html/render.rs +++ b/src/librustdoc/html/render.rs @@ -2281,7 +2281,10 @@ fn short_stability(item: &clean::Item, cx: &Context) -> Vec<String> { ); message.push_str(&format!(": {}", html.to_string())); } - stability.push(format!("<div class='stab deprecated'>{}</div>", message)); + stability.push(format!( + "<div class='stab deprecated'><span class='emoji'>👎</span> {}</div>", + message, + )); } if let Some(stab) = item.stability.as_ref().filter(|stab| stab.level == stability::Unstable) { diff --git a/src/test/rustdoc/issue-32374.rs b/src/test/rustdoc/issue-32374.rs index 7babfaf6060..11caa34d4b1 100644 --- a/src/test/rustdoc/issue-32374.rs +++ b/src/test/rustdoc/issue-32374.rs @@ -10,7 +10,7 @@ // @matches issue_32374/index.html '//*[@class="docblock-short"]/text()' 'Docs' // @has issue_32374/struct.T.html '//*[@class="stab deprecated"]' \ -// 'Deprecated since 1.0.0: text' +// '👎 Deprecated since 1.0.0: text' // @has - '<code>test</code> <a href="http://issue_url/32374">#32374</a>' // @matches issue_32374/struct.T.html '//*[@class="stab unstable"]' \ // '🔬 This is a nightly-only experimental API. \(test\s#32374\)$' @@ -20,7 +20,7 @@ pub struct T; // @has issue_32374/struct.U.html '//*[@class="stab deprecated"]' \ -// 'Deprecated since 1.0.0: deprecated' +// '👎 Deprecated since 1.0.0: deprecated' // @has issue_32374/struct.U.html '//*[@class="stab unstable"]' \ // '🔬 This is a nightly-only experimental API. (test #32374)' // @has issue_32374/struct.U.html '//details' \ |
