@@ -12,6 +12,8 @@ LL | macro_rules! foo {
12
12
...
13
13
LL | foo!(a?);
14
14
| ^ no rules expected this token in macro call
15
+ |
16
+ = note: while trying to match sequence end
15
17
16
18
error: no rules expected the token `?`
17
19
--> $DIR/macro-at-most-once-rep-2015.rs:26:11
@@ -21,6 +23,8 @@ LL | macro_rules! foo {
21
23
...
22
24
LL | foo!(a?a);
23
25
| ^ no rules expected this token in macro call
26
+ |
27
+ = note: while trying to match sequence end
24
28
25
29
error: no rules expected the token `?`
26
30
--> $DIR/macro-at-most-once-rep-2015.rs:27:11
@@ -30,6 +34,8 @@ LL | macro_rules! foo {
30
34
...
31
35
LL | foo!(a?a?a);
32
36
| ^ no rules expected this token in macro call
37
+ |
38
+ = note: while trying to match sequence end
33
39
34
40
error: unexpected end of macro invocation
35
41
--> $DIR/macro-at-most-once-rep-2015.rs:29:5
@@ -39,6 +45,12 @@ LL | macro_rules! barplus {
39
45
...
40
46
LL | barplus!();
41
47
| ^^^^^^^^^^ missing tokens in macro arguments
48
+ |
49
+ note: while trying to match `+`
50
+ --> $DIR/macro-at-most-once-rep-2015.rs:15:11
51
+ |
52
+ LL | ($(a)?+) => {}; // ok. matches "a+" and "+"
53
+ | ^
42
54
43
55
error: unexpected end of macro invocation
44
56
--> $DIR/macro-at-most-once-rep-2015.rs:30:15
@@ -48,6 +60,12 @@ LL | macro_rules! barplus {
48
60
...
49
61
LL | barplus!(a);
50
62
| ^ missing tokens in macro arguments
63
+ |
64
+ note: while trying to match `+`
65
+ --> $DIR/macro-at-most-once-rep-2015.rs:15:11
66
+ |
67
+ LL | ($(a)?+) => {}; // ok. matches "a+" and "+"
68
+ | ^
51
69
52
70
error: no rules expected the token `?`
53
71
--> $DIR/macro-at-most-once-rep-2015.rs:31:15
@@ -57,6 +75,12 @@ LL | macro_rules! barplus {
57
75
...
58
76
LL | barplus!(a?);
59
77
| ^ no rules expected this token in macro call
78
+ |
79
+ note: while trying to match `+`
80
+ --> $DIR/macro-at-most-once-rep-2015.rs:15:11
81
+ |
82
+ LL | ($(a)?+) => {}; // ok. matches "a+" and "+"
83
+ | ^
60
84
61
85
error: no rules expected the token `?`
62
86
--> $DIR/macro-at-most-once-rep-2015.rs:32:15
@@ -66,6 +90,12 @@ LL | macro_rules! barplus {
66
90
...
67
91
LL | barplus!(a?a);
68
92
| ^ no rules expected this token in macro call
93
+ |
94
+ note: while trying to match `+`
95
+ --> $DIR/macro-at-most-once-rep-2015.rs:15:11
96
+ |
97
+ LL | ($(a)?+) => {}; // ok. matches "a+" and "+"
98
+ | ^
69
99
70
100
error: unexpected end of macro invocation
71
101
--> $DIR/macro-at-most-once-rep-2015.rs:36:5
@@ -75,6 +105,12 @@ LL | macro_rules! barstar {
75
105
...
76
106
LL | barstar!();
77
107
| ^^^^^^^^^^ missing tokens in macro arguments
108
+ |
109
+ note: while trying to match `*`
110
+ --> $DIR/macro-at-most-once-rep-2015.rs:19:11
111
+ |
112
+ LL | ($(a)?*) => {}; // ok. matches "a*" and "*"
113
+ | ^
78
114
79
115
error: unexpected end of macro invocation
80
116
--> $DIR/macro-at-most-once-rep-2015.rs:37:15
@@ -84,6 +120,12 @@ LL | macro_rules! barstar {
84
120
...
85
121
LL | barstar!(a);
86
122
| ^ missing tokens in macro arguments
123
+ |
124
+ note: while trying to match `*`
125
+ --> $DIR/macro-at-most-once-rep-2015.rs:19:11
126
+ |
127
+ LL | ($(a)?*) => {}; // ok. matches "a*" and "*"
128
+ | ^
87
129
88
130
error: no rules expected the token `?`
89
131
--> $DIR/macro-at-most-once-rep-2015.rs:38:15
@@ -93,6 +135,12 @@ LL | macro_rules! barstar {
93
135
...
94
136
LL | barstar!(a?);
95
137
| ^ no rules expected this token in macro call
138
+ |
139
+ note: while trying to match `*`
140
+ --> $DIR/macro-at-most-once-rep-2015.rs:19:11
141
+ |
142
+ LL | ($(a)?*) => {}; // ok. matches "a*" and "*"
143
+ | ^
96
144
97
145
error: no rules expected the token `?`
98
146
--> $DIR/macro-at-most-once-rep-2015.rs:39:15
@@ -102,6 +150,12 @@ LL | macro_rules! barstar {
102
150
...
103
151
LL | barstar!(a?a);
104
152
| ^ no rules expected this token in macro call
153
+ |
154
+ note: while trying to match `*`
155
+ --> $DIR/macro-at-most-once-rep-2015.rs:19:11
156
+ |
157
+ LL | ($(a)?*) => {}; // ok. matches "a*" and "*"
158
+ | ^
105
159
106
160
error: aborting due to 12 previous errors
107
161
0 commit comments