]> git.proxmox.com Git - rustc.git/blob - src/test/ui/macros/syntax-error-recovery.rs
New upstream version 1.66.0+dfsg1
[rustc.git] / src / test / ui / macros / syntax-error-recovery.rs
1 macro_rules! values {
2 ($($token:ident($value:literal) $(as $inner:ty)? => $attr:meta,)*) => {
3 #[derive(Debug)]
4 pub enum TokenKind {
5 $(
6 #[$attr]
7 $token $($inner)? = $value,
8 )*
9 }
10 };
11 }
12 //~^^^^^ ERROR expected one of `(`, `,`, `=`, `{`, or `}`, found `(String)`
13 //~| ERROR macro expansion ignores token `(String)` and any following
14
15 values!(STRING(1) as (String) => cfg(test),);
16 //~^ ERROR expected one of `!` or `::`, found `<eof>`
17
18 fn main() {}