-
-
Notifications
You must be signed in to change notification settings - Fork 14.9k
rustdoc::broken_intra_doc_links behavior change with macro_rules not in scope since 1.63 #106142
Copy link
Copy link
Closed
Closed
Copy link
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-macrosArea: All kinds of macros (custom derive, macro_rules!, proc macros, ..)Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..)C-bugCategory: This is a bug.Category: This is a bug.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 nameA-macrosArea: All kinds of macros (custom derive, macro_rules!, proc macros, ..)Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..)C-bugCategory: This is a bug.Category: This is a bug.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.
rustdoc>= 1.63 complains about this intra-doc link:with:
However, the link is still generated in the rendered output, and points to the right place. Thus the text "unresolved link" is a bit confusing, especially since in earlier versions (<= 1.62), there was no warning for this case (and the link still got generated too).
With e.g.
crate::m, the warning goes away.Therefore, if the intended behavior is that the user writes something like
crate::m, then when the user just wrotemthe link should not be generated (which would make the text of the lint consistent) or the link could be generated but then the warning should say the link may still be generated.On the other hand, if the intended behavior is that
mstill works as-is like in previous versions, then it is a false positive and a regression on the lint.