macro_rules
broken on latest nightly
#138178
Labels
A-attributes
Area: Attributes (`#[…]`, `#![…]`)
C-bug
Category: This is a bug.
S-needs-info
Status: The issue lacks details necessary to triage or act on it.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
After updating to latest nightly, my code that uses
macro_rules
is broken.Example: (playground)
I would expect
create_enum!(Enum,u32)
to expand to:Instead, it seems that it expands to:
Rustc and Rust analyzer both catch this, and produces diagnostic:
On the other hand, if I run
Inline macro
code action, it produces correct result.As can be seen from
assert_eq
s inmain()
, size ofEnum
should be4
, but it is1
instead.Meta
rustc --version --verbose
:The text was updated successfully, but these errors were encountered: