Rollup merge of #109375 - clubby789:unescape-deprecated-doc, r=jsha

rustdoc: Fix improper escaping of deprecation reasons

Fix #109374

r? `@jsha`
This commit is contained in:
Matthias Krüger 2023-03-20 07:10:35 +01:00 committed by GitHub
commit 130923586d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -2,7 +2,7 @@
{% when Self::Deprecation with { message } %} {% when Self::Deprecation with { message } %}
<div class="stab deprecated"> {# #} <div class="stab deprecated"> {# #}
<span class="emoji">👎</span> {# #} <span class="emoji">👎</span> {# #}
<span>{{message}}</span> {# #} <span>{{message|safe}}</span> {# #}
</div> {# #} </div> {# #}
{% when Self::Unstable with { feature, tracking } %} {% when Self::Unstable with { feature, tracking } %}
<div class="stab unstable"> {# #} <div class="stab unstable"> {# #}

View File

@ -28,6 +28,6 @@
pub struct W; pub struct W;
// @matches deprecated/struct.X.html '//*[@class="stab deprecated"]' \ // @matches deprecated/struct.X.html '//*[@class="stab deprecated"]' \
// 'Deprecated: shorthand reason$' // 'Deprecated: shorthand reason: code$'
#[deprecated = "shorthand reason"] #[deprecated = "shorthand reason: `code`"]
pub struct X; pub struct X;