-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
rustdoc emits confusing error for link to enum struct field #85756
Copy link
Copy link
Open
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsA-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.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsA-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.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Given the following code with a broken intra-doc link (note the
basinstead ofbaz):I would expect
cargo docto emit an error along the lines of:Instead,
cargo docemits this error:When I first encountered this in real code, I thought that the confusing error message was a symptom of the fact that doc comments on enum variant struct fields were not supported, so I almost gave up before realizing that it was just a confusingly-worded error message.
Meta