Skip to content

Implementors column on trait page is always empty #91118

Open
@aDotInTheVoid

Description

@aDotInTheVoid

buf.push_str("<h3 class=\"sidebar-title\"><a href=\"#implementors\">Implementors</a></h3>");

This leads to

image

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.

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)C-discussionCategory: Discussion or questions that doesn't represent real issues.T-rustdocRelevant 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.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions