-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
rustdoc: generate-macro-expansion produces incorrect expansion for macros in type position #150197
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, ..)A-rustdoc-uiArea: Rustdoc UI (generated HTML)Area: Rustdoc UI (generated HTML)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.T-rustdoc-frontendRelevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output.Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output.
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, ..)A-rustdoc-uiArea: Rustdoc UI (generated HTML)Area: Rustdoc UI (generated HTML)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.T-rustdoc-frontendRelevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output.Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Code
Reproduction Steps
rustdoc -Zunstable-options --generate-macro-expansion thefile.rsExpected Outcome
foo!()should expand to().foo!(42)should expand to[(); 1].Actual Output
let _: foo!();does not show an expansion toggle at all.let _: foo!(42);expands tolet _: 1;Version
rustdoc 1.94.0-nightly (806c2a3 2025-12-19)
Additional Details
Tracking issue: #148222
Found while working on #150154
@rustbot label +A-macros +A-rustdoc-ui +B-unstable