@@ -22,8 +22,20 @@ error: macro definition ended unexpectedly
2222LL | macro_rules! attr_incomplete_4 { attr() {} => }
2323 | ^ expected right-hand side of macro rule
2424
25+ error: macro definition ended unexpectedly
26+ --> $DIR/macro-attr-bad.rs:16:40
27+ |
28+ LL | macro_rules! attr_incomplete_5 { unsafe }
29+ | ^ expected `attr`
30+
31+ error: macro definition ended unexpectedly
32+ --> $DIR/macro-attr-bad.rs:19:45
33+ |
34+ LL | macro_rules! attr_incomplete_6 { unsafe attr }
35+ | ^ expected macro attr args
36+
2537error: `attr` rule argument matchers require parentheses
26- --> $DIR/macro-attr-bad.rs:16 :36
38+ --> $DIR/macro-attr-bad.rs:22 :36
2739 |
2840LL | macro_rules! attr_noparens_1 { attr{} {} => {} }
2941 | ^^
@@ -35,7 +47,7 @@ LL + macro_rules! attr_noparens_1 { attr() {} => {} }
3547 |
3648
3749error: `attr` rule argument matchers require parentheses
38- --> $DIR/macro-attr-bad.rs:19 :36
50+ --> $DIR/macro-attr-bad.rs:25 :36
3951 |
4052LL | macro_rules! attr_noparens_2 { attr[] {} => {} }
4153 | ^^
@@ -47,34 +59,34 @@ LL + macro_rules! attr_noparens_2 { attr() {} => {} }
4759 |
4860
4961error: invalid macro matcher; matchers must be contained in balanced delimiters
50- --> $DIR/macro-attr-bad.rs:22 :37
62+ --> $DIR/macro-attr-bad.rs:28 :37
5163 |
5264LL | macro_rules! attr_noparens_3 { attr _ {} => {} }
5365 | ^
5466
5567error: duplicate matcher binding
56- --> $DIR/macro-attr-bad.rs:25 :52
68+ --> $DIR/macro-attr-bad.rs:31 :52
5769 |
5870LL | macro_rules! attr_dup_matcher_1 { attr() {$x:ident $x:ident} => {} }
5971 | -------- ^^^^^^^^ duplicate binding
6072 | |
6173 | previous binding
6274
6375error: duplicate matcher binding
64- --> $DIR/macro-attr-bad.rs:28 :49
76+ --> $DIR/macro-attr-bad.rs:34 :49
6577 |
6678LL | macro_rules! attr_dup_matcher_2 { attr($x:ident $x:ident) {} => {} }
6779 | -------- ^^^^^^^^ duplicate binding
6880 | |
6981 | previous binding
7082
7183error: duplicate matcher binding
72- --> $DIR/macro-attr-bad.rs:31 :51
84+ --> $DIR/macro-attr-bad.rs:37 :51
7385 |
7486LL | macro_rules! attr_dup_matcher_3 { attr($x:ident) {$x:ident} => {} }
7587 | -------- ^^^^^^^^ duplicate binding
7688 | |
7789 | previous binding
7890
79- error: aborting due to 10 previous errors
91+ error: aborting due to 12 previous errors
8092
0 commit comments