-
Notifications
You must be signed in to change notification settings - Fork 14k
Open
Labels
C-cleanupCategory: PRs that clean code up or issues documenting cleanup.Category: PRs that clean code up or issues documenting cleanup.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
Currently, we handle URL fragments (the # part) in at least three different locations:
html::format::print_anchorclean::Item::links(generates href from intra doc links)html::render::assoc_href_attr
The two first can be merged in a straighforward way: href_with_root_path should be split to allow to pass the "parent" DefId (which would be the same as the item DefId if it's not an associated item) directly. That would make it easier to be used from clean::Item::links. It will likely require changes in collect_intra_doc_links because UrlFragment::Item holds a DefId supposed to be of the associated item, but sometimes both UrlFragment::Item and ItemLink::page_id are the same (like methods on a trait), meaning something needs to be fixed there.
Once these two have been merged, we can look at merging with the third one.
Metadata
Metadata
Assignees
Labels
C-cleanupCategory: PRs that clean code up or issues documenting cleanup.Category: PRs that clean code up or issues documenting cleanup.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.