-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
Links in doc comments to proc_macro_attribute functions cause rustdoc panic #55399
Copy link
Copy link
Closed
Closed
Copy link
Labels
A-decl-macros-1-2Area: Declarative macros 1.2Area: Declarative macros 1.2A-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 nameI-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️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-decl-macros-1-2Area: Declarative macros 1.2Area: Declarative macros 1.2A-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 nameI-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️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.
The following code builds successfully but causes a compiler panic when running
cargo doc:src/lib.rs
Cargo.toml
Compiler error
Toolchain
Changing
function_nameto another name, either in the doc comment or the actual function name (but not both), causescargo docto succeed with a warning that the link cannot be resolved, as expected.Using a normal public function in a non-proc_macro library also does not cause a panic, e.g.