-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Open
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 nameA-resolveArea: Name/path resolution done by `rustc_resolve` specificallyArea: Name/path resolution done by `rustc_resolve` specificallyA-suggestion-diagnosticsArea: Suggestions generated by the compiler applied by `cargo fix`Area: Suggestions generated by the compiler applied by `cargo fix`C-feature-requestCategory: A feature request, i.e: not implemented / a PR.Category: A feature request, i.e: not implemented / a PR.E-hardCall for participation: Hard difficulty. Experience needed to fix: A lot.Call for participation: Hard difficulty. Experience needed to fix: A lot.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
This will be tricky for several reasons.
- It needs pulldown support to look at the links even if they're not broken.
Event
andTag
seem like they should work. - Rustdoc needs to know what the link is meant to resolve to. This can be tricky if the item is re-exported in multiple places (see e.g. Broken links in
String
documentation fromDeref
impl #32129). Rustdoc should report all possible items you meant if there's ambiguity (and downgrade the applicability). - Rustdoc needs to know what name in scope matches with the item you're linking too. This seems like it shouldn't be too hard, but I don't see a way to go from
DefId
->Path
onResolver
, only the reverse. cc @Manishearth, do you have ideas?
This can be implemented as an allowed-by-default lint with Applicability::MachineApplicable
; then cargo fix
will pick it up automatically.
pickfire
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 nameA-resolveArea: Name/path resolution done by `rustc_resolve` specificallyArea: Name/path resolution done by `rustc_resolve` specificallyA-suggestion-diagnosticsArea: Suggestions generated by the compiler applied by `cargo fix`Area: Suggestions generated by the compiler applied by `cargo fix`C-feature-requestCategory: A feature request, i.e: not implemented / a PR.Category: A feature request, i.e: not implemented / a PR.E-hardCall for participation: Hard difficulty. Experience needed to fix: A lot.Call for participation: Hard difficulty. Experience needed to fix: A lot.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.