Skip to content

Commit e97edad

Browse files
committed
update tests
1 parent 32aafb2 commit e97edad

6 files changed

+16
-189
lines changed

src/test/ui/macros/macro-at-most-once-rep-2015-ques-rep-feature-flag.rs

Lines changed: 0 additions & 28 deletions
This file was deleted.

src/test/ui/macros/macro-at-most-once-rep-2015-ques-rep-feature-flag.stderr

Lines changed: 0 additions & 18 deletions
This file was deleted.

src/test/ui/macros/macro-at-most-once-rep-2018-feature-gate.rs

Lines changed: 0 additions & 45 deletions
This file was deleted.

src/test/ui/macros/macro-at-most-once-rep-2018-feature-gate.stderr

Lines changed: 0 additions & 80 deletions
This file was deleted.

src/test/ui/macros/macro-at-most-once-rep-2018.rs

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,22 +12,20 @@
1212

1313
// edition:2018
1414

15-
#![feature(macro_at_most_once_rep)]
16-
1715
macro_rules! foo {
18-
($(a)?) => {}
16+
($(a)?) => {};
1917
}
2018

2119
macro_rules! baz {
22-
($(a),?) => {} //~ERROR the `?` macro repetition operator
20+
($(a),?) => {}; //~ERROR the `?` macro repetition operator
2321
}
2422

2523
macro_rules! barplus {
26-
($(a)?+) => {} // ok. matches "a+" and "+"
24+
($(a)?+) => {}; // ok. matches "a+" and "+"
2725
}
2826

2927
macro_rules! barstar {
30-
($(a)?*) => {} // ok. matches "a*" and "*"
28+
($(a)?*) => {}; // ok. matches "a*" and "*"
3129
}
3230

3331
pub fn main() {
@@ -41,7 +39,7 @@ pub fn main() {
4139
barplus!(a); //~ERROR unexpected end of macro invocation
4240
barplus!(a?); //~ ERROR no rules expected the token `?`
4341
barplus!(a?a); //~ ERROR no rules expected the token `?`
44-
barplus!(a+);
42+
barplus!(a);
4543
barplus!(+);
4644

4745
barstar!(); //~ERROR unexpected end of macro invocation

src/test/ui/macros/macro-at-most-once-rep-2018.stderr

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
error: the `?` macro repetition operator does not take a separator
2-
--> $DIR/macro-at-most-once-rep-2018.rs:22:10
2+
--> $DIR/macro-at-most-once-rep-2018.rs:20:10
33
|
44
LL | ($(a),?) => {} //~ERROR the `?` macro repetition operator
55
| ^
66

77
error: no rules expected the token `?`
8-
--> $DIR/macro-at-most-once-rep-2018.rs:36:11
8+
--> $DIR/macro-at-most-once-rep-2018.rs:34:11
99
|
1010
LL | macro_rules! foo {
1111
| ---------------- when calling this macro
@@ -14,7 +14,7 @@ LL | foo!(a?); //~ ERROR no rules expected the token `?`
1414
| ^ no rules expected this token in macro call
1515

1616
error: no rules expected the token `?`
17-
--> $DIR/macro-at-most-once-rep-2018.rs:37:11
17+
--> $DIR/macro-at-most-once-rep-2018.rs:35:11
1818
|
1919
LL | macro_rules! foo {
2020
| ---------------- when calling this macro
@@ -23,7 +23,7 @@ LL | foo!(a?a); //~ ERROR no rules expected the token `?`
2323
| ^ no rules expected this token in macro call
2424

2525
error: no rules expected the token `?`
26-
--> $DIR/macro-at-most-once-rep-2018.rs:38:11
26+
--> $DIR/macro-at-most-once-rep-2018.rs:36:11
2727
|
2828
LL | macro_rules! foo {
2929
| ---------------- when calling this macro
@@ -32,7 +32,7 @@ LL | foo!(a?a?a); //~ ERROR no rules expected the token `?`
3232
| ^ no rules expected this token in macro call
3333

3434
error: unexpected end of macro invocation
35-
--> $DIR/macro-at-most-once-rep-2018.rs:40:5
35+
--> $DIR/macro-at-most-once-rep-2018.rs:38:5
3636
|
3737
LL | macro_rules! barplus {
3838
| -------------------- when calling this macro
@@ -50,7 +50,7 @@ LL | barplus!(a); //~ERROR unexpected end of macro invocation
5050
| ^ missing tokens in macro arguments
5151

5252
error: no rules expected the token `?`
53-
--> $DIR/macro-at-most-once-rep-2018.rs:42:15
53+
--> $DIR/macro-at-most-once-rep-2018.rs:40:15
5454
|
5555
LL | macro_rules! barplus {
5656
| -------------------- when calling this macro
@@ -59,7 +59,7 @@ LL | barplus!(a?); //~ ERROR no rules expected the token `?`
5959
| ^ no rules expected this token in macro call
6060

6161
error: no rules expected the token `?`
62-
--> $DIR/macro-at-most-once-rep-2018.rs:43:15
62+
--> $DIR/macro-at-most-once-rep-2018.rs:41:15
6363
|
6464
LL | macro_rules! barplus {
6565
| -------------------- when calling this macro
@@ -68,7 +68,7 @@ LL | barplus!(a?a); //~ ERROR no rules expected the token `?`
6868
| ^ no rules expected this token in macro call
6969

7070
error: unexpected end of macro invocation
71-
--> $DIR/macro-at-most-once-rep-2018.rs:47:5
71+
--> $DIR/macro-at-most-once-rep-2018.rs:45:5
7272
|
7373
LL | macro_rules! barstar {
7474
| -------------------- when calling this macro
@@ -77,7 +77,7 @@ LL | barstar!(); //~ERROR unexpected end of macro invocation
7777
| ^^^^^^^^^^^ missing tokens in macro arguments
7878

7979
error: unexpected end of macro invocation
80-
--> $DIR/macro-at-most-once-rep-2018.rs:48:15
80+
--> $DIR/macro-at-most-once-rep-2018.rs:46:14
8181
|
8282
LL | macro_rules! barstar {
8383
| -------------------- when calling this macro
@@ -86,7 +86,7 @@ LL | barstar!(a); //~ERROR unexpected end of macro invocation
8686
| ^ missing tokens in macro arguments
8787

8888
error: no rules expected the token `?`
89-
--> $DIR/macro-at-most-once-rep-2018.rs:49:15
89+
--> $DIR/macro-at-most-once-rep-2018.rs:47:15
9090
|
9191
LL | macro_rules! barstar {
9292
| -------------------- when calling this macro
@@ -95,7 +95,7 @@ LL | barstar!(a?); //~ ERROR no rules expected the token `?`
9595
| ^ no rules expected this token in macro call
9696

9797
error: no rules expected the token `?`
98-
--> $DIR/macro-at-most-once-rep-2018.rs:50:15
98+
--> $DIR/macro-at-most-once-rep-2018.rs:48:15
9999
|
100100
LL | macro_rules! barstar {
101101
| -------------------- when calling this macro

0 commit comments

Comments
 (0)