-
Notifications
You must be signed in to change notification settings - Fork 13.6k
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-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.E-mentorCall for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.P-mediumMedium priorityMedium priorityT-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 code works fine:
pub enum Foo {
/// [Self::Bar::abc]
Bar {
abc: i32,
xyz: i32,
},
}
But this code's intra-doc link doesn't resolve:
pub enum Foo {
Bar {
abc: i32,
/// [Self::Bar::abc]
xyz: i32,
},
}
warning: unresolved link to `Bar::Bar::abc`
--> foo.rs:4:14
|
4 | /// [Self::Bar::abc]
| ^^^^^^^^^^^^^^ no item named `Bar` in scope
|
= note: `#[warn(broken_intra_doc_links)]` on by default
Doesn't Self
usually only refer to types, not enum variants? (Barring the proposed RFC to make enum variant types.)
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-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.E-mentorCall for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.P-mediumMedium priorityMedium priorityT-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.