-
-
Notifications
You must be signed in to change notification settings - Fork 14.3k
Open
Labels
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.needs-triageThis issue may need triage. Remove it if it has been sufficiently triaged.This issue may need triage. Remove it if it has been sufficiently triaged.
Description
Code
macro_rules! foo {
() => {
()
};
($baz:expr) => {
[(); 1]
};
}
fn bar() {
let _: foo!();
let _: foo!(42);
}Reproduction Steps
rustdoc -Zunstable-options --generate-macro-expansion thefile.rs
Expected 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
Metadata
Metadata
Assignees
Labels
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.needs-triageThis issue may need triage. Remove it if it has been sufficiently triaged.This issue may need triage. Remove it if it has been sufficiently triaged.