Skip to content

rustdoc generates duplicate id attributes #25001

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
apasel422 opened this issue Apr 30, 2015 · 1 comment · Fixed by #30036
Closed

rustdoc generates duplicate id attributes #25001

apasel422 opened this issue Apr 30, 2015 · 1 comment · Fixed by #30036
Labels
T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@apasel422
Copy link
Contributor

When two items in the same documentation page have the same name, rustdoc generates duplicate HTML id attributes for them. This makes the HTML invalid, but more importantly, it makes it impossible to link to anything but the one that shows up first in the source.

For example, Vec's page contains multiple impls of IntoIterator, and therefore multiple HTML elements that have an id attribute of assoc_type.Item, assoc_type.IntoIter, and method.into_iter.

This is not limited to impls of the same trait, as different traits (and inherent impls) could define methods or associated types with the same name.

@steveklabnik steveklabnik added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Apr 30, 2015
@nagisa
Copy link
Member

nagisa commented May 3, 2015

Similar to #17476 #20700

cc @alexcrichton as you’ve fixed #17476 and closed #20700 as dupe of #17476

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants