Skip to content

Commit

Permalink
feat: Add 'object-safety' ID to init_id_map() in rustdoc
Browse files Browse the repository at this point in the history
  • Loading branch information
poliorcetics committed Oct 29, 2023
1 parent 13b166a commit 7580c67
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/librustdoc/html/markdown.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2024,6 +2024,7 @@ fn init_id_map() -> FxHashMap<Cow<'static, str>, usize> {
map.insert("required-associated-consts".into(), 1);
map.insert("required-methods".into(), 1);
map.insert("provided-methods".into(), 1);
map.insert("object-safety".into(), 1);
map.insert("implementors".into(), 1);
map.insert("synthetic-implementors".into(), 1);
map.insert("implementations-list".into(), 1);
Expand Down
3 changes: 2 additions & 1 deletion src/librustdoc/html/render/print_item.rs
Original file line number Diff line number Diff line change
Expand Up @@ -965,7 +965,8 @@ fn item_trait(w: &mut Buffer, cx: &mut Context<'_>, it: &clean::Item, t: &clean:
w,
"object-safety",
"Object Safety",
&format!("<div class=\"object-safety-info\">This trait is <b>not</b> \
&format!(
"<div class=\"object-safety-info\">This trait is <b>not</b> \
<a href=\"{base}/reference/items/traits.html#object-safety\">\
object safe</a>.</div>",
base = crate::clean::utils::DOC_RUST_LANG_ORG_CHANNEL
Expand Down

0 comments on commit 7580c67

Please sign in to comment.