]> git.lizzy.rs Git - rust.git/blob - src/test/ui/parser/macro/macro-incomplete-parse.rs
Rollup merge of #91956 - notriddle:notriddle/unused-parens-range, r=nagisa
[rust.git] / src / test / ui / parser / macro / macro-incomplete-parse.rs
1 macro_rules! ignored_item {
2     () => {
3         fn foo() {}
4         fn bar() {}
5         , //~ ERROR macro expansion ignores token `,`
6     }
7 }
8
9 macro_rules! ignored_expr {
10     () => ( 1,  //~ ERROR expected one of `.`, `;`, `?`, `}`, or an operator, found `,`
11
12             2 )
13 }
14
15 macro_rules! ignored_pat {
16     () => ( 1, 2 ) //~ ERROR macro expansion ignores token `,`
17 }
18
19 ignored_item!();
20
21 fn main() {
22     ignored_expr!();
23     match 1 {
24         ignored_pat!() => (),
25         _ => (),
26     }
27 }