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