Skip to content

Commit 76c67dd

Browse files
committed
Fix test
1 parent 5916da2 commit 76c67dd

File tree

5 files changed

+18
-16
lines changed

5 files changed

+18
-16
lines changed

crates/parser/src/grammar/items.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,14 +60,14 @@ pub(super) fn item_or_macro(p: &mut Parser<'_>, stop_on_r_curly: bool) {
6060

6161
// test macro_rules_as_macro_name
6262
// macro_rules! {}
63-
// macro_rules! {};
6463
// macro_rules! ();
6564
// macro_rules! [];
6665
// fn main() {
6766
// let foo = macro_rules!();
6867
// }
6968

7069
// test_err macro_rules_as_macro_name
70+
// macro_rules! {};
7171
// macro_rules! ()
7272
// macro_rules! []
7373
if paths::is_use_path_start(p)

crates/parser/test_data/parser/inline/err/0026_macro_rules_as_macro_name.rast

+16-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,17 @@
11
SOURCE_FILE
2+
MACRO_CALL
3+
PATH
4+
PATH_SEGMENT
5+
NAME_REF
6+
IDENT "macro_rules"
7+
BANG "!"
8+
WHITESPACE " "
9+
TOKEN_TREE
10+
L_CURLY "{"
11+
R_CURLY "}"
12+
ERROR
13+
SEMICOLON ";"
14+
WHITESPACE "\n"
215
MACRO_CALL
316
PATH
417
PATH_SEGMENT
@@ -21,5 +34,6 @@ SOURCE_FILE
2134
L_BRACK "["
2235
R_BRACK "]"
2336
WHITESPACE "\n"
24-
error 15: expected SEMICOLON
25-
error 31: expected SEMICOLON
37+
error 15: expected an item
38+
error 32: expected SEMICOLON
39+
error 48: expected SEMICOLON
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1+
macro_rules! {};
12
macro_rules! ()
23
macro_rules! []

crates/parser/test_data/parser/inline/ok/0208_macro_rules_as_macro_name.rast

-12
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,6 @@ SOURCE_FILE
1010
L_CURLY "{"
1111
R_CURLY "}"
1212
WHITESPACE "\n"
13-
MACRO_CALL
14-
PATH
15-
PATH_SEGMENT
16-
NAME_REF
17-
IDENT "macro_rules"
18-
BANG "!"
19-
WHITESPACE " "
20-
TOKEN_TREE
21-
L_CURLY "{"
22-
R_CURLY "}"
23-
SEMICOLON ";"
24-
WHITESPACE "\n"
2513
MACRO_CALL
2614
PATH
2715
PATH_SEGMENT

crates/parser/test_data/parser/inline/ok/0208_macro_rules_as_macro_name.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
macro_rules! {}
2-
macro_rules! {};
32
macro_rules! ();
43
macro_rules! [];
54
fn main() {

0 commit comments

Comments
 (0)