-
Notifications
You must be signed in to change notification settings - Fork 14k
Open
Labels
A-rustdoc-uiArea: Rustdoc UI (generated HTML)Area: Rustdoc UI (generated HTML)C-discussionCategory: Discussion or questions that doesn't represent real issues.Category: Discussion or questions that doesn't represent real issues.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.Relevant to the rustdoc team, which will review and decide on the PR/issue.T-rustdoc-frontendRelevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output.Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output.
Description
rust/src/librustdoc/html/render/mod.rs
Line 2328 in 65f3f8b
| buf.push_str("<h3 class=\"sidebar-title\"><a href=\"#implementors\">Implementors</a></h3>"); |
This leads to
when the Implementors column is empty
This is finiky to implement, cant just find the html id's for a given item cannot be determined from that item, due to the derive_id makeing the id dependent on cx state.
rust/src/librustdoc/html/render/mod.rs
Lines 1694 to 1703 in cebd2dd
| let id = cx.derive_id(match i.inner_impl().trait_ { | |
| Some(ref t) => { | |
| if is_on_foreign_type { | |
| get_id_for_impl_on_foreign_type(&i.inner_impl().for_, t, cx) | |
| } else { | |
| format!("impl-{}", small_url_encode(format!("{:#}", t.print(cx)))) | |
| } | |
| } | |
| None => "impl".to_string(), | |
| }); |
A way around this would be to add a HashMap<DefId, String> to Context, but I'm not sure if this is the best way arround this, and would apprecieate other ideas.
@rustbot claim
@rustbot modify labels: +A-rustdoc-ui +T-rustdoc
Metadata
Metadata
Assignees
Labels
A-rustdoc-uiArea: Rustdoc UI (generated HTML)Area: Rustdoc UI (generated HTML)C-discussionCategory: Discussion or questions that doesn't represent real issues.Category: Discussion or questions that doesn't represent real issues.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.Relevant to the rustdoc team, which will review and decide on the PR/issue.T-rustdoc-frontendRelevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output.Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output.
