feat: Add 'object-safety' ID to init_id_map() in rustdoc

This commit is contained in:
Alexis (Poliorcetics) Bourget 2023-07-08 17:29:05 +02:00
parent 51e22be682
commit 40556b968c
2 changed files with 3 additions and 1 deletions

View File

@ -2024,6 +2024,7 @@ fn init_id_map() -> FxHashMap<Cow<'static, str>, usize> {
map.insert("required-associated-consts".into(), 1); map.insert("required-associated-consts".into(), 1);
map.insert("required-methods".into(), 1); map.insert("required-methods".into(), 1);
map.insert("provided-methods".into(), 1); map.insert("provided-methods".into(), 1);
map.insert("object-safety".into(), 1);
map.insert("implementors".into(), 1); map.insert("implementors".into(), 1);
map.insert("synthetic-implementors".into(), 1); map.insert("synthetic-implementors".into(), 1);
map.insert("implementations-list".into(), 1); map.insert("implementations-list".into(), 1);

View File

@ -965,7 +965,8 @@ fn trait_item(w: &mut Buffer, cx: &mut Context<'_>, m: &clean::Item, t: &clean::
w, w,
"object-safety", "object-safety",
"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\">\ <a href=\"{base}/reference/items/traits.html#object-safety\">\
object safe</a>.</div>", object safe</a>.</div>",
base = crate::clean::utils::DOC_RUST_LANG_ORG_CHANNEL base = crate::clean::utils::DOC_RUST_LANG_ORG_CHANNEL