Closed
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
Area: Intra-doc links, the ability to link to items in docs by nameCategory: This is a bug.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.Medium priorityRelevant to the rustdoc team, which will review and decide on the PR/issue.