rustdoc generates duplicate id
attributes
#25001
Labels
T-rustdoc
Relevant to the rustdoc team, which will review and decide on the PR/issue.
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 ofIntoIterator
, and therefore multiple HTML elements that have anid
attribute ofassoc_type.Item
,assoc_type.IntoIter
, andmethod.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.
The text was updated successfully, but these errors were encountered: