-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-rustdoc-uiArea: Rustdoc UI (generated HTML)Area: Rustdoc UI (generated HTML)C-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.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.
Description
Problem
Links to impls and their associated items are currently unstable in the sense that the addition of other items causes pre-existing items to have different URL fragments. This is because the URL fragments are only disambiguated by suffixing a number. If more items are added, the suffix changes. In addition, the suffix is not very human-understandable; it's hard to know which suffix will be chosen by rustdoc.
Proposed changes
- Instead of generating
#impl
,#impl-1
, etc., generate IDs like#impl-Add<&str>-for-String
(or similar). - Prefix associated impl items (e.g., methods) with the ID of their impl.
- [Maybe:] Prefix namespaced Markdown headings within methods with the impl ID as well.
Concerns and unresolved questions
- Longer URL fragments will increase HTML page size. Will gzip compression mitigate this increased raw size?
Metadata
Metadata
Assignees
Labels
A-rustdoc-uiArea: Rustdoc UI (generated HTML)Area: Rustdoc UI (generated HTML)C-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.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.