-
Notifications
You must be signed in to change notification settings - Fork 184
Open
Description
Summary
It seems like recursive macros aren't being expanded correctly. Notably, the issue seems to go away if the metavariable isn't an ident
.
Reproducer
I tried this code:
#![allow(path_statements)]
macro_rules! array_impl_default {
{$t:ident} => {
$t;
array_impl_default!{}
};
{} => {};
}
pub fn foo() {
let x = 12;
array_impl_default! {x}
}
Does the code make use of any (1.49) nightly feature ?
- Nightly
Godbolt link
https://godbolt.org/z/Mbd1cdYhb
Actual behavior
An infinite loop
Expected behavior
Compiles
GCC Version
Metadata
Metadata
Assignees
Labels
No labels