diff options
Diffstat (limited to 'tests/data/parser')
6 files changed, 51 insertions, 0 deletions
diff --git a/tests/data/parser/inline/0014_type_item_type_params.rs b/tests/data/parser/inline/0014_type_item_type_params.rs new file mode 100644 index 000000000..defd110c4 --- /dev/null +++ b/tests/data/parser/inline/0014_type_item_type_params.rs | |||
@@ -0,0 +1 @@ | |||
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 new file mode 100644 index 000000000..b0f0f8337 --- /dev/null +++ b/tests/data/parser/inline/0014_type_item_type_params.txt | |||
@@ -0,0 +1,17 @@ | |||
1 | FILE@[0; 21) | ||
2 | TYPE_ITEM@[0; 21) | ||
3 | TYPE_KW@[0; 4) | ||
4 | WHITESPACE@[4; 5) | ||
5 | IDENT@[5; 11) "Result" | ||
6 | TYPE_PARAM_LIST@[11; 15) | ||
7 | L_ANGLE@[11; 12) | ||
8 | TYPE_PARAM@[12; 13) | ||
9 | IDENT@[12; 13) "T" | ||
10 | R_ANGLE@[13; 14) | ||
11 | WHITESPACE@[14; 15) | ||
12 | EQ@[15; 16) | ||
13 | WHITESPACE@[16; 17) | ||
14 | L_PAREN@[17; 18) | ||
15 | R_PAREN@[18; 19) | ||
16 | SEMI@[19; 20) | ||
17 | WHITESPACE@[20; 21) | ||
diff --git a/tests/data/parser/inline/0015_type_item.rs b/tests/data/parser/inline/0015_type_item.rs new file mode 100644 index 000000000..04c0344fa --- /dev/null +++ b/tests/data/parser/inline/0015_type_item.rs | |||
@@ -0,0 +1 @@ | |||
type Foo = Bar; | |||
diff --git a/tests/data/parser/inline/0015_type_item.txt b/tests/data/parser/inline/0015_type_item.txt new file mode 100644 index 000000000..382d7ece0 --- /dev/null +++ b/tests/data/parser/inline/0015_type_item.txt | |||
@@ -0,0 +1,11 @@ | |||
1 | FILE@[0; 16) | ||
2 | TYPE_ITEM@[0; 16) | ||
3 | TYPE_KW@[0; 4) | ||
4 | WHITESPACE@[4; 5) | ||
5 | IDENT@[5; 8) "Foo" | ||
6 | WHITESPACE@[8; 9) | ||
7 | EQ@[9; 10) | ||
8 | WHITESPACE@[10; 11) | ||
9 | IDENT@[11; 14) "Bar" | ||
10 | SEMI@[14; 15) | ||
11 | WHITESPACE@[15; 16) | ||
diff --git a/tests/data/parser/inline/0016_type_item_where_clause.rs b/tests/data/parser/inline/0016_type_item_where_clause.rs new file mode 100644 index 000000000..a602d07f0 --- /dev/null +++ b/tests/data/parser/inline/0016_type_item_where_clause.rs | |||
@@ -0,0 +1 @@ | |||
type Foo where Foo: Copy = (); | |||
diff --git a/tests/data/parser/inline/0016_type_item_where_clause.txt b/tests/data/parser/inline/0016_type_item_where_clause.txt new file mode 100644 index 000000000..ddd335870 --- /dev/null +++ b/tests/data/parser/inline/0016_type_item_where_clause.txt | |||
@@ -0,0 +1,20 @@ | |||
1 | FILE@[0; 31) | ||
2 | TYPE_ITEM@[0; 31) | ||
3 | TYPE_KW@[0; 4) | ||
4 | WHITESPACE@[4; 5) | ||
5 | IDENT@[5; 8) "Foo" | ||
6 | WHERE_CLAUSE@[8; 25) | ||
7 | WHITESPACE@[8; 9) | ||
8 | WHERE_KW@[9; 14) | ||
9 | WHITESPACE@[14; 15) | ||
10 | IDENT@[15; 18) "Foo" | ||
11 | COLON@[18; 19) | ||
12 | WHITESPACE@[19; 20) | ||
13 | IDENT@[20; 24) "Copy" | ||
14 | WHITESPACE@[24; 25) | ||
15 | EQ@[25; 26) | ||
16 | WHITESPACE@[26; 27) | ||
17 | L_PAREN@[27; 28) | ||
18 | R_PAREN@[28; 29) | ||
19 | SEMI@[29; 30) | ||
20 | WHITESPACE@[30; 31) | ||