aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/parser/grammar/items/mod.rs2
-rw-r--r--tests/data/parser/inline/0014_type_item_type_params.txt5
-rw-r--r--tests/data/parser/inline/0015_type_item.txt7
-rw-r--r--tests/data/parser/inline/0016_type_item_where_clause.txt7
4 files changed, 12 insertions, 9 deletions
diff --git a/src/parser/grammar/items/mod.rs b/src/parser/grammar/items/mod.rs
index 61ebc740f..2d9580991 100644
--- a/src/parser/grammar/items/mod.rs
+++ b/src/parser/grammar/items/mod.rs
@@ -236,7 +236,7 @@ fn type_item(p: &mut Parser) {
236 assert!(p.at(TYPE_KW)); 236 assert!(p.at(TYPE_KW));
237 p.bump(); 237 p.bump();
238 238
239 p.expect(IDENT); 239 name(p);
240 240
241 // test type_item_type_params 241 // test type_item_type_params
242 // type Result<T> = (); 242 // type Result<T> = ();
diff --git a/tests/data/parser/inline/0014_type_item_type_params.txt b/tests/data/parser/inline/0014_type_item_type_params.txt
index b0f0f8337..ca32faa42 100644
--- a/tests/data/parser/inline/0014_type_item_type_params.txt
+++ b/tests/data/parser/inline/0014_type_item_type_params.txt
@@ -1,8 +1,9 @@
1FILE@[0; 21) 1FILE@[0; 21)
2 TYPE_ITEM@[0; 21) 2 TYPE_ITEM@[0; 21)
3 TYPE_KW@[0; 4) 3 TYPE_KW@[0; 4)
4 WHITESPACE@[4; 5) 4 NAME@[4; 11)
5 IDENT@[5; 11) "Result" 5 WHITESPACE@[4; 5)
6 IDENT@[5; 11) "Result"
6 TYPE_PARAM_LIST@[11; 15) 7 TYPE_PARAM_LIST@[11; 15)
7 L_ANGLE@[11; 12) 8 L_ANGLE@[11; 12)
8 TYPE_PARAM@[12; 13) 9 TYPE_PARAM@[12; 13)
diff --git a/tests/data/parser/inline/0015_type_item.txt b/tests/data/parser/inline/0015_type_item.txt
index 382d7ece0..3818fe25d 100644
--- a/tests/data/parser/inline/0015_type_item.txt
+++ b/tests/data/parser/inline/0015_type_item.txt
@@ -1,9 +1,10 @@
1FILE@[0; 16) 1FILE@[0; 16)
2 TYPE_ITEM@[0; 16) 2 TYPE_ITEM@[0; 16)
3 TYPE_KW@[0; 4) 3 TYPE_KW@[0; 4)
4 WHITESPACE@[4; 5) 4 NAME@[4; 9)
5 IDENT@[5; 8) "Foo" 5 WHITESPACE@[4; 5)
6 WHITESPACE@[8; 9) 6 IDENT@[5; 8) "Foo"
7 WHITESPACE@[8; 9)
7 EQ@[9; 10) 8 EQ@[9; 10)
8 WHITESPACE@[10; 11) 9 WHITESPACE@[10; 11)
9 IDENT@[11; 14) "Bar" 10 IDENT@[11; 14) "Bar"
diff --git a/tests/data/parser/inline/0016_type_item_where_clause.txt b/tests/data/parser/inline/0016_type_item_where_clause.txt
index ddd335870..12bbc752a 100644
--- a/tests/data/parser/inline/0016_type_item_where_clause.txt
+++ b/tests/data/parser/inline/0016_type_item_where_clause.txt
@@ -1,10 +1,11 @@
1FILE@[0; 31) 1FILE@[0; 31)
2 TYPE_ITEM@[0; 31) 2 TYPE_ITEM@[0; 31)
3 TYPE_KW@[0; 4) 3 TYPE_KW@[0; 4)
4 WHITESPACE@[4; 5) 4 NAME@[4; 9)
5 IDENT@[5; 8) "Foo" 5 WHITESPACE@[4; 5)
6 WHERE_CLAUSE@[8; 25) 6 IDENT@[5; 8) "Foo"
7 WHITESPACE@[8; 9) 7 WHITESPACE@[8; 9)
8 WHERE_CLAUSE@[9; 25)
8 WHERE_KW@[9; 14) 9 WHERE_KW@[9; 14)
9 WHITESPACE@[14; 15) 10 WHITESPACE@[14; 15)
10 IDENT@[15; 18) "Foo" 11 IDENT@[15; 18) "Foo"