2024-03-02 08:42:13 -06:00
|
|
|
//@ compile-flags: -Zdeduplicate-diagnostics=yes
|
|
|
|
|
2020-09-27 08:52:51 -05:00
|
|
|
// Macros were previously expanded in `Expr` nonterminal tokens, now they are not.
|
|
|
|
|
|
|
|
macro_rules! pass_nonterminal {
|
|
|
|
($n:expr) => {
|
2021-07-09 15:03:48 -05:00
|
|
|
#[repr(align($n))]
|
|
|
|
//~^ ERROR expected unsuffixed literal or identifier, found `n!()`
|
2020-09-27 08:52:51 -05:00
|
|
|
struct S;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
macro_rules! n {
|
|
|
|
() => { 32 };
|
|
|
|
}
|
|
|
|
|
|
|
|
pass_nonterminal!(n!());
|
2024-03-02 09:18:06 -06:00
|
|
|
//~^ ERROR incorrect `repr(align)` attribute format: `align` expects a literal integer as argument [E0693]
|
2020-09-27 08:52:51 -05:00
|
|
|
|
|
|
|
fn main() {}
|