blob: ff2b36f7d27d5c29ed4614020b2113365f727408 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
//@ compile-flags: -Zdeduplicate-diagnostics=yes
// Macros were previously expanded in `Expr` nonterminal tokens, now they are not.
macro_rules! pass_nonterminal {
($n:expr) => {
#[repr(align($n))]
//~^ ERROR expected a literal (`1u8`, `1.0f32`, `"string"`, etc.) here, found `expr` metavariable
struct S;
};
}
macro_rules! n {
() => { 32 };
}
pass_nonterminal!(n!());
fn main() {}
|