@@ -7,123 +7,101 @@ LL | ($(a),?) => {} //~ERROR the `?` macro repetition operator
7
7
error: no rules expected the token `?`
8
8
--> $DIR/macro-at-most-once-rep-2018.rs:36:11
9
9
|
10
- LL | / macro_rules! foo {
11
- LL | | ($(a)?) => {}
12
- LL | | }
13
- | |_- when calling this macro
10
+ LL | macro_rules! foo {
11
+ | ---------------- when calling this macro
14
12
...
15
- LL | foo!(a?); //~ ERROR no rules expected the token `?`
16
- | ^ no rules expected the token `?`
13
+ LL | foo!(a?); //~ ERROR no rules expected the token `?`
14
+ | ^ no rules expected the token `?`
17
15
18
16
error: no rules expected the token `?`
19
17
--> $DIR/macro-at-most-once-rep-2018.rs:37:11
20
18
|
21
- LL | / macro_rules! foo {
22
- LL | | ($(a)?) => {}
23
- LL | | }
24
- | |_- when calling this macro
19
+ LL | macro_rules! foo {
20
+ | ---------------- when calling this macro
25
21
...
26
- LL | foo!(a?a); //~ ERROR no rules expected the token `?`
27
- | ^ no rules expected the token `?`
22
+ LL | foo!(a?a); //~ ERROR no rules expected the token `?`
23
+ | ^ no rules expected the token `?`
28
24
29
25
error: no rules expected the token `?`
30
26
--> $DIR/macro-at-most-once-rep-2018.rs:38:11
31
27
|
32
- LL | / macro_rules! foo {
33
- LL | | ($(a)?) => {}
34
- LL | | }
35
- | |_- when calling this macro
28
+ LL | macro_rules! foo {
29
+ | ---------------- when calling this macro
36
30
...
37
- LL | foo!(a?a?a); //~ ERROR no rules expected the token `?`
38
- | ^ no rules expected the token `?`
31
+ LL | foo!(a?a?a); //~ ERROR no rules expected the token `?`
32
+ | ^ no rules expected the token `?`
39
33
40
34
error: unexpected end of macro invocation
41
35
--> $DIR/macro-at-most-once-rep-2018.rs:40:5
42
36
|
43
- LL | / macro_rules! barplus {
44
- LL | | ($(a)?+) => {} // ok. matches "a+" and "+"
45
- LL | | }
46
- | |_- when calling this macro
37
+ LL | macro_rules! barplus {
38
+ | -------------------- when calling this macro
47
39
...
48
- LL | barplus!(); //~ERROR unexpected end of macro invocation
49
- | ^^^^^^^^^^^ unexpected end of macro invocation
40
+ LL | barplus!(); //~ERROR unexpected end of macro invocation
41
+ | ^^^^^^^^^^^ unexpected end of macro invocation
50
42
51
43
error: unexpected end of macro invocation
52
44
--> $DIR/macro-at-most-once-rep-2018.rs:41:14
53
45
|
54
- LL | / macro_rules! barplus {
55
- LL | | ($(a)?+) => {} // ok. matches "a+" and "+"
56
- LL | | }
57
- | |_- when calling this macro
46
+ LL | macro_rules! barplus {
47
+ | -------------------- when calling this macro
58
48
...
59
- LL | barplus!(a); //~ERROR unexpected end of macro invocation
60
- | ^ unexpected end of macro invocation
49
+ LL | barplus!(a); //~ERROR unexpected end of macro invocation
50
+ | ^ unexpected end of macro invocation
61
51
62
52
error: no rules expected the token `?`
63
53
--> $DIR/macro-at-most-once-rep-2018.rs:42:15
64
54
|
65
- LL | / macro_rules! barplus {
66
- LL | | ($(a)?+) => {} // ok. matches "a+" and "+"
67
- LL | | }
68
- | |_- when calling this macro
55
+ LL | macro_rules! barplus {
56
+ | -------------------- when calling this macro
69
57
...
70
- LL | barplus!(a?); //~ ERROR no rules expected the token `?`
71
- | ^ no rules expected the token `?`
58
+ LL | barplus!(a?); //~ ERROR no rules expected the token `?`
59
+ | ^ no rules expected the token `?`
72
60
73
61
error: no rules expected the token `?`
74
62
--> $DIR/macro-at-most-once-rep-2018.rs:43:15
75
63
|
76
- LL | / macro_rules! barplus {
77
- LL | | ($(a)?+) => {} // ok. matches "a+" and "+"
78
- LL | | }
79
- | |_- when calling this macro
64
+ LL | macro_rules! barplus {
65
+ | -------------------- when calling this macro
80
66
...
81
- LL | barplus!(a?a); //~ ERROR no rules expected the token `?`
82
- | ^ no rules expected the token `?`
67
+ LL | barplus!(a?a); //~ ERROR no rules expected the token `?`
68
+ | ^ no rules expected the token `?`
83
69
84
70
error: unexpected end of macro invocation
85
71
--> $DIR/macro-at-most-once-rep-2018.rs:47:5
86
72
|
87
- LL | / macro_rules! barstar {
88
- LL | | ($(a)?*) => {} // ok. matches "a*" and "*"
89
- LL | | }
90
- | |_- when calling this macro
73
+ LL | macro_rules! barstar {
74
+ | -------------------- when calling this macro
91
75
...
92
- LL | barstar!(); //~ERROR unexpected end of macro invocation
93
- | ^^^^^^^^^^^ unexpected end of macro invocation
76
+ LL | barstar!(); //~ERROR unexpected end of macro invocation
77
+ | ^^^^^^^^^^^ unexpected end of macro invocation
94
78
95
79
error: unexpected end of macro invocation
96
80
--> $DIR/macro-at-most-once-rep-2018.rs:48:14
97
81
|
98
- LL | / macro_rules! barstar {
99
- LL | | ($(a)?*) => {} // ok. matches "a*" and "*"
100
- LL | | }
101
- | |_- when calling this macro
82
+ LL | macro_rules! barstar {
83
+ | -------------------- when calling this macro
102
84
...
103
- LL | barstar!(a); //~ERROR unexpected end of macro invocation
104
- | ^ unexpected end of macro invocation
85
+ LL | barstar!(a); //~ERROR unexpected end of macro invocation
86
+ | ^ unexpected end of macro invocation
105
87
106
88
error: no rules expected the token `?`
107
89
--> $DIR/macro-at-most-once-rep-2018.rs:49:15
108
90
|
109
- LL | / macro_rules! barstar {
110
- LL | | ($(a)?*) => {} // ok. matches "a*" and "*"
111
- LL | | }
112
- | |_- when calling this macro
91
+ LL | macro_rules! barstar {
92
+ | -------------------- when calling this macro
113
93
...
114
- LL | barstar!(a?); //~ ERROR no rules expected the token `?`
115
- | ^ no rules expected the token `?`
94
+ LL | barstar!(a?); //~ ERROR no rules expected the token `?`
95
+ | ^ no rules expected the token `?`
116
96
117
97
error: no rules expected the token `?`
118
98
--> $DIR/macro-at-most-once-rep-2018.rs:50:15
119
99
|
120
- LL | / macro_rules! barstar {
121
- LL | | ($(a)?*) => {} // ok. matches "a*" and "*"
122
- LL | | }
123
- | |_- when calling this macro
100
+ LL | macro_rules! barstar {
101
+ | -------------------- when calling this macro
124
102
...
125
- LL | barstar!(a?a); //~ ERROR no rules expected the token `?`
126
- | ^ no rules expected the token `?`
103
+ LL | barstar!(a?a); //~ ERROR no rules expected the token `?`
104
+ | ^ no rules expected the token `?`
127
105
128
106
error: aborting due to 12 previous errors
129
107
0 commit comments