-
-
Notifications
You must be signed in to change notification settings - Fork 15k
Intradoc Self:: links are "not in scope" when used in impl blocks across modules #93205
Copy link
Copy link
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-bugCategory: This is a bug.Category: This is a bug.E-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.Call for participation: An issue has been fixed and does not reproduce, but no test has been added.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.
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-bugCategory: This is a bug.Category: This is a bug.E-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.Call for participation: An issue has been fixed and does not reproduce, but no test has been added.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.
Type
Fields
Give feedbackNo fields configured for issues without a type.
I tried this code:
I expected to see this happen:
Self::intradoc links for theimplblock residing inmod prelude(whereMyNewTypeis not defined) are valid links.Instead, this happened: Rustdoc thinks that
Self, resolved toMyNewType, is not in scope here:A workaround is to make sure that
MyNewType, withoutsuper::prefix, is in scope:In other words, it seems that
Selfin intradoc links resolve to the name of the item, not the full path?Meta
rustc --version --verbose: