mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-15 10:07:30 +00:00
19 lines
402 B
Rust
19 lines
402 B
Rust
// Macros were previously expanded in `Expr` nonterminal tokens, now they are not.
|
|
|
|
macro_rules! pass_nonterminal {
|
|
($n:expr) => {
|
|
#[repr(align($n))]
|
|
//~^ ERROR expected unsuffixed literal or identifier, found `n!()`
|
|
//~| ERROR incorrect `repr(align)` attribute format
|
|
struct S;
|
|
};
|
|
}
|
|
|
|
macro_rules! n {
|
|
() => { 32 };
|
|
}
|
|
|
|
pass_nonterminal!(n!());
|
|
|
|
fn main() {}
|