]> git.lizzy.rs Git - rust.git/blob - tests/ui/macros/syntax-error-recovery.rs
Rollup merge of #104505 - WaffleLapkin:no-double-spaces-in-comments, r=jackh726
[rust.git] / tests / 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() {}