-
-
Notifications
You must be signed in to change notification settings - Fork 14.9k
Rustdoc can generate wrong macro_rules! syntax #60543
Copy link
Copy link
Closed
Labels
A-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-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.
Example: https://docs.rs/pkg-version/0.1.0/pkg_version/macro.pkg_version_minor.html
The source code looks like this:
The rustdoc output looks like this:
Now I'm not entirely sure how
#[proc_macro_hack]works, but I don't think rustdoc should ever produce... this? The matcher is syntactically invalid, so this should never really happen.Perhaps related to #45939, but I'm not sure.