aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/data/parser/inline/0059_fn_item_where_clause.rs1
-rw-r--r--tests/data/parser/inline/0059_fn_item_where_clause.txt28
-rw-r--r--tests/data/parser/inline/0060_fn_item_type_params.rs1
-rw-r--r--tests/data/parser/inline/0060_fn_item_type_params.txt32
4 files changed, 62 insertions, 0 deletions
diff --git a/tests/data/parser/inline/0059_fn_item_where_clause.rs b/tests/data/parser/inline/0059_fn_item_where_clause.rs
new file mode 100644
index 000000000..f0920b2a8
--- /dev/null
+++ b/tests/data/parser/inline/0059_fn_item_where_clause.rs
@@ -0,0 +1 @@
fn foo<T>() where T: Copy {}
diff --git a/tests/data/parser/inline/0059_fn_item_where_clause.txt b/tests/data/parser/inline/0059_fn_item_where_clause.txt
new file mode 100644
index 000000000..c904d171f
--- /dev/null
+++ b/tests/data/parser/inline/0059_fn_item_where_clause.txt
@@ -0,0 +1,28 @@
1FILE@[0; 29)
2 FN_ITEM@[0; 29)
3 FN_KW@[0; 2)
4 NAME@[2; 6)
5 WHITESPACE@[2; 3)
6 IDENT@[3; 6) "foo"
7 TYPE_PARAM_LIST@[6; 9)
8 L_ANGLE@[6; 7)
9 TYPE_PARAM@[7; 8)
10 NAME@[7; 8)
11 IDENT@[7; 8) "T"
12 R_ANGLE@[8; 9)
13 PARAM_LIST@[9; 12)
14 L_PAREN@[9; 10)
15 R_PAREN@[10; 11)
16 WHITESPACE@[11; 12)
17 WHERE_CLAUSE@[12; 26)
18 WHERE_KW@[12; 17)
19 WHITESPACE@[17; 18)
20 IDENT@[18; 19) "T"
21 COLON@[19; 20)
22 WHITESPACE@[20; 21)
23 IDENT@[21; 25) "Copy"
24 WHITESPACE@[25; 26)
25 BLOCK@[26; 29)
26 L_CURLY@[26; 27)
27 R_CURLY@[27; 28)
28 WHITESPACE@[28; 29)
diff --git a/tests/data/parser/inline/0060_fn_item_type_params.rs b/tests/data/parser/inline/0060_fn_item_type_params.rs
new file mode 100644
index 000000000..9df40ed39
--- /dev/null
+++ b/tests/data/parser/inline/0060_fn_item_type_params.rs
@@ -0,0 +1 @@
fn foo<T: Clone + Copy>(){}
diff --git a/tests/data/parser/inline/0060_fn_item_type_params.txt b/tests/data/parser/inline/0060_fn_item_type_params.txt
new file mode 100644
index 000000000..0b0f8352b
--- /dev/null
+++ b/tests/data/parser/inline/0060_fn_item_type_params.txt
@@ -0,0 +1,32 @@
1FILE@[0; 28)
2 FN_ITEM@[0; 28)
3 FN_KW@[0; 2)
4 NAME@[2; 6)
5 WHITESPACE@[2; 3)
6 IDENT@[3; 6) "foo"
7 TYPE_PARAM_LIST@[6; 23)
8 L_ANGLE@[6; 7)
9 TYPE_PARAM@[7; 22)
10 NAME@[7; 8)
11 IDENT@[7; 8) "T"
12 COLON@[8; 9)
13 PATH@[9; 16)
14 PATH_SEGMENT@[9; 16)
15 NAME_REF@[9; 16)
16 WHITESPACE@[9; 10)
17 IDENT@[10; 15) "Clone"
18 WHITESPACE@[15; 16)
19 PLUS@[16; 17)
20 PATH@[17; 22)
21 PATH_SEGMENT@[17; 22)
22 NAME_REF@[17; 22)
23 WHITESPACE@[17; 18)
24 IDENT@[18; 22) "Copy"
25 R_ANGLE@[22; 23)
26 PARAM_LIST@[23; 25)
27 L_PAREN@[23; 24)
28 R_PAREN@[24; 25)
29 BLOCK@[25; 28)
30 L_CURLY@[25; 26)
31 R_CURLY@[26; 27)
32 WHITESPACE@[27; 28)