-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Closed
Labels
A-intra-doc-linksArea: Intra-doc links, the ability to link to items in docs by nameArea: Intra-doc links, the ability to link to items in docs by nameC-feature-requestCategory: A feature request, i.e: not implemented / a PR.Category: A feature request, i.e: not implemented / a PR.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
The link will be broken if the item is re-exported into a different module, see #76497 for an example. Rustdoc should recommend prefixing the link with either Self
or self
, depending on whether it's on a type or module.
There is a caveat here that this only works if you're documenting an item, not arbitrary #
links - otherwise self
and Self
don't make sense. In particular rustdoc can't tell a #
link from a normal link, so this would have to go after the intra-doc pass in https://github.com/rust-lang/rust/blob/master/src/librustdoc/html/markdown.rs somewhere.
Metadata
Metadata
Assignees
Labels
A-intra-doc-linksArea: Intra-doc links, the ability to link to items in docs by nameArea: Intra-doc links, the ability to link to items in docs by nameC-feature-requestCategory: A feature request, i.e: not implemented / a PR.Category: A feature request, i.e: not implemented / a PR.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.