Skip to content

Commit c74f2dc

Browse files
committed
Fix improper escaping of deprecation reasons
1 parent 2d0a7de commit c74f2dc

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/librustdoc/html/templates/short_item_info.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
{% when Self::Deprecation with { message } %}
33
<div class="stab deprecated"> {# #}
44
<span class="emoji">👎</span> {# #}
5-
<span>{{message}}</span> {# #}
5+
<span>{{message|safe}}</span> {# #}
66
</div> {# #}
77
{% when Self::Unstable with { feature, tracking } %}
88
<div class="stab unstable"> {# #}

tests/rustdoc/deprecated.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,6 @@ pub struct V;
2828
pub struct W;
2929

3030
// @matches deprecated/struct.X.html '//*[@class="stab deprecated"]' \
31-
// 'Deprecated: shorthand reason$'
32-
#[deprecated = "shorthand reason"]
31+
// 'Deprecated: shorthand reason: code$'
32+
#[deprecated = "shorthand reason: `code`"]
3333
pub struct X;

0 commit comments

Comments
 (0)