]> git.proxmox.com Git - rustc.git/blob - tests/ui/attributes/nonterminal-expansion.rs
New upstream version 1.68.2+dfsg1
[rustc.git] / tests / ui / attributes / nonterminal-expansion.rs
1 // Macros were previously expanded in `Expr` nonterminal tokens, now they are not.
2
3 macro_rules! pass_nonterminal {
4 ($n:expr) => {
5 #[repr(align($n))]
6 //~^ ERROR expected unsuffixed literal or identifier, found `n!()`
7 //~| ERROR incorrect `repr(align)` attribute format
8 struct S;
9 };
10 }
11
12 macro_rules! n {
13 () => { 32 };
14 }
15
16 pass_nonterminal!(n!());
17
18 fn main() {}