diff options
Diffstat (limited to 'crates/ra_syntax/tests/data/parser/inline')
15 files changed, 292 insertions, 176 deletions
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0001_trait_item_list.txt b/crates/ra_syntax/tests/data/parser/inline/ok/0001_trait_item_list.txt index 7c9e1e621..39cadffbc 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0001_trait_item_list.txt +++ b/crates/ra_syntax/tests/data/parser/inline/ok/0001_trait_item_list.txt | |||
@@ -18,11 +18,13 @@ SOURCE_FILE@[0; 83) | |||
18 | IDENT@[18; 19) "A" | 18 | IDENT@[18; 19) "A" |
19 | COLON@[19; 20) | 19 | COLON@[19; 20) |
20 | WHITESPACE@[20; 21) | 20 | WHITESPACE@[20; 21) |
21 | PATH_TYPE@[21; 26) | 21 | TYPE_BOUND_LIST@[21; 26) |
22 | PATH@[21; 26) | 22 | TYPE_BOUND@[21; 26) |
23 | PATH_SEGMENT@[21; 26) | 23 | PATH_TYPE@[21; 26) |
24 | NAME_REF@[21; 26) | 24 | PATH@[21; 26) |
25 | IDENT@[21; 26) "Clone" | 25 | PATH_SEGMENT@[21; 26) |
26 | NAME_REF@[21; 26) | ||
27 | IDENT@[21; 26) "Clone" | ||
26 | SEMI@[26; 27) | 28 | SEMI@[26; 27) |
27 | WHITESPACE@[27; 32) | 29 | WHITESPACE@[27; 32) |
28 | CONST_DEF@[32; 45) | 30 | CONST_DEF@[32; 45) |
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0003_where_pred_for.txt b/crates/ra_syntax/tests/data/parser/inline/ok/0003_where_pred_for.txt index 41420ea92..8bc29564e 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0003_where_pred_for.txt +++ b/crates/ra_syntax/tests/data/parser/inline/ok/0003_where_pred_for.txt | |||
@@ -33,24 +33,26 @@ SOURCE_FILE@[0; 49) | |||
33 | IDENT@[30; 31) "F" | 33 | IDENT@[30; 31) "F" |
34 | COLON@[31; 32) | 34 | COLON@[31; 32) |
35 | WHITESPACE@[32; 33) | 35 | WHITESPACE@[32; 33) |
36 | PATH_TYPE@[33; 44) | 36 | TYPE_BOUND_LIST@[33; 44) |
37 | PATH@[33; 44) | 37 | TYPE_BOUND@[33; 44) |
38 | PATH_SEGMENT@[33; 44) | 38 | PATH_TYPE@[33; 44) |
39 | NAME_REF@[33; 35) | 39 | PATH@[33; 44) |
40 | IDENT@[33; 35) "Fn" | 40 | PATH_SEGMENT@[33; 44) |
41 | PARAM_LIST@[35; 44) | 41 | NAME_REF@[33; 35) |
42 | L_PAREN@[35; 36) | 42 | IDENT@[33; 35) "Fn" |
43 | PARAM@[36; 43) | 43 | PARAM_LIST@[35; 44) |
44 | REFERENCE_TYPE@[36; 43) | 44 | L_PAREN@[35; 36) |
45 | AMP@[36; 37) | 45 | PARAM@[36; 43) |
46 | LIFETIME@[37; 39) "'a" | 46 | REFERENCE_TYPE@[36; 43) |
47 | WHITESPACE@[39; 40) | 47 | AMP@[36; 37) |
48 | PATH_TYPE@[40; 43) | 48 | LIFETIME@[37; 39) "'a" |
49 | PATH@[40; 43) | 49 | WHITESPACE@[39; 40) |
50 | PATH_SEGMENT@[40; 43) | 50 | PATH_TYPE@[40; 43) |
51 | NAME_REF@[40; 43) | 51 | PATH@[40; 43) |
52 | IDENT@[40; 43) "str" | 52 | PATH_SEGMENT@[40; 43) |
53 | R_PAREN@[43; 44) | 53 | NAME_REF@[40; 43) |
54 | IDENT@[40; 43) "str" | ||
55 | R_PAREN@[43; 44) | ||
54 | WHITESPACE@[44; 45) | 56 | WHITESPACE@[44; 45) |
55 | BLOCK@[45; 48) | 57 | BLOCK@[45; 48) |
56 | L_CURLY@[45; 46) | 58 | L_CURLY@[45; 46) |
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0005_function_type_params.txt b/crates/ra_syntax/tests/data/parser/inline/ok/0005_function_type_params.txt index b20f13267..0cbe7c56c 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0005_function_type_params.txt +++ b/crates/ra_syntax/tests/data/parser/inline/ok/0005_function_type_params.txt | |||
@@ -11,19 +11,22 @@ SOURCE_FILE@[0; 28) | |||
11 | IDENT@[7; 8) "T" | 11 | IDENT@[7; 8) "T" |
12 | COLON@[8; 9) | 12 | COLON@[8; 9) |
13 | WHITESPACE@[9; 10) | 13 | WHITESPACE@[9; 10) |
14 | PATH_TYPE@[10; 22) | 14 | TYPE_BOUND_LIST@[10; 22) |
15 | PATH@[10; 15) | 15 | TYPE_BOUND@[10; 15) |
16 | PATH_SEGMENT@[10; 15) | 16 | PATH_TYPE@[10; 15) |
17 | NAME_REF@[10; 15) | 17 | PATH@[10; 15) |
18 | IDENT@[10; 15) "Clone" | 18 | PATH_SEGMENT@[10; 15) |
19 | NAME_REF@[10; 15) | ||
20 | IDENT@[10; 15) "Clone" | ||
19 | WHITESPACE@[15; 16) | 21 | WHITESPACE@[15; 16) |
20 | PLUS@[16; 17) | 22 | PLUS@[16; 17) |
21 | WHITESPACE@[17; 18) | 23 | WHITESPACE@[17; 18) |
22 | PATH_TYPE@[18; 22) | 24 | TYPE_BOUND@[18; 22) |
23 | PATH@[18; 22) | 25 | PATH_TYPE@[18; 22) |
24 | PATH_SEGMENT@[18; 22) | 26 | PATH@[18; 22) |
25 | NAME_REF@[18; 22) | 27 | PATH_SEGMENT@[18; 22) |
26 | IDENT@[18; 22) "Copy" | 28 | NAME_REF@[18; 22) |
29 | IDENT@[18; 22) "Copy" | ||
27 | R_ANGLE@[22; 23) | 30 | R_ANGLE@[22; 23) |
28 | PARAM_LIST@[23; 25) | 31 | PARAM_LIST@[23; 25) |
29 | L_PAREN@[23; 24) | 32 | L_PAREN@[23; 24) |
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0007_type_param_bounds.txt b/crates/ra_syntax/tests/data/parser/inline/ok/0007_type_param_bounds.txt index 745cf8798..81479d2ea 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0007_type_param_bounds.txt +++ b/crates/ra_syntax/tests/data/parser/inline/ok/0007_type_param_bounds.txt | |||
@@ -11,26 +11,30 @@ SOURCE_FILE@[0; 35) | |||
11 | IDENT@[9; 10) "T" | 11 | IDENT@[9; 10) "T" |
12 | COLON@[10; 11) | 12 | COLON@[10; 11) |
13 | WHITESPACE@[11; 12) | 13 | WHITESPACE@[11; 12) |
14 | LIFETIME@[12; 14) "'a" | 14 | TYPE_BOUND_LIST@[12; 32) |
15 | WHITESPACE@[14; 15) | 15 | TYPE_BOUND@[12; 14) |
16 | PLUS@[15; 16) | 16 | LIFETIME@[12; 14) "'a" |
17 | WHITESPACE@[16; 17) | 17 | WHITESPACE@[14; 15) |
18 | QUESTION@[17; 18) | 18 | PLUS@[15; 16) |
19 | PATH_TYPE@[18; 32) | 19 | WHITESPACE@[16; 17) |
20 | PATH@[18; 23) | 20 | TYPE_BOUND@[17; 23) |
21 | PATH_SEGMENT@[18; 23) | 21 | QUESTION@[17; 18) |
22 | NAME_REF@[18; 23) | 22 | PATH_TYPE@[18; 23) |
23 | IDENT@[18; 23) "Sized" | 23 | PATH@[18; 23) |
24 | PATH_SEGMENT@[18; 23) | ||
25 | NAME_REF@[18; 23) | ||
26 | IDENT@[18; 23) "Sized" | ||
24 | WHITESPACE@[23; 24) | 27 | WHITESPACE@[23; 24) |
25 | PLUS@[24; 25) | 28 | PLUS@[24; 25) |
26 | WHITESPACE@[25; 26) | 29 | WHITESPACE@[25; 26) |
27 | L_PAREN@[26; 27) | 30 | TYPE_BOUND@[26; 32) |
28 | PATH_TYPE@[27; 31) | 31 | L_PAREN@[26; 27) |
29 | PATH@[27; 31) | 32 | PATH_TYPE@[27; 31) |
30 | PATH_SEGMENT@[27; 31) | 33 | PATH@[27; 31) |
31 | NAME_REF@[27; 31) | 34 | PATH_SEGMENT@[27; 31) |
32 | IDENT@[27; 31) "Copy" | 35 | NAME_REF@[27; 31) |
33 | R_PAREN@[31; 32) | 36 | IDENT@[27; 31) "Copy" |
37 | R_PAREN@[31; 32) | ||
34 | R_ANGLE@[32; 33) | 38 | R_ANGLE@[32; 33) |
35 | SEMI@[33; 34) | 39 | SEMI@[33; 34) |
36 | WHITESPACE@[34; 35) | 40 | WHITESPACE@[34; 35) |
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0012_type_item_where_clause.txt b/crates/ra_syntax/tests/data/parser/inline/ok/0012_type_item_where_clause.txt index 9a5f46bab..c99a03155 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0012_type_item_where_clause.txt +++ b/crates/ra_syntax/tests/data/parser/inline/ok/0012_type_item_where_clause.txt | |||
@@ -16,11 +16,13 @@ SOURCE_FILE@[0; 31) | |||
16 | IDENT@[15; 18) "Foo" | 16 | IDENT@[15; 18) "Foo" |
17 | COLON@[18; 19) | 17 | COLON@[18; 19) |
18 | WHITESPACE@[19; 20) | 18 | WHITESPACE@[19; 20) |
19 | PATH_TYPE@[20; 24) | 19 | TYPE_BOUND_LIST@[20; 24) |
20 | PATH@[20; 24) | 20 | TYPE_BOUND@[20; 24) |
21 | PATH_SEGMENT@[20; 24) | 21 | PATH_TYPE@[20; 24) |
22 | NAME_REF@[20; 24) | 22 | PATH@[20; 24) |
23 | IDENT@[20; 24) "Copy" | 23 | PATH_SEGMENT@[20; 24) |
24 | NAME_REF@[20; 24) | ||
25 | IDENT@[20; 24) "Copy" | ||
24 | WHITESPACE@[24; 25) | 26 | WHITESPACE@[24; 25) |
25 | EQ@[25; 26) | 27 | EQ@[25; 26) |
26 | WHITESPACE@[26; 27) | 28 | WHITESPACE@[26; 27) |
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0028_impl_trait_type.txt b/crates/ra_syntax/tests/data/parser/inline/ok/0028_impl_trait_type.txt index 3b676fb4c..31dbbe96c 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0028_impl_trait_type.txt +++ b/crates/ra_syntax/tests/data/parser/inline/ok/0028_impl_trait_type.txt | |||
@@ -10,31 +10,34 @@ SOURCE_FILE@[0; 43) | |||
10 | IMPL_TRAIT_TYPE@[9; 41) | 10 | IMPL_TRAIT_TYPE@[9; 41) |
11 | IMPL_KW@[9; 13) | 11 | IMPL_KW@[9; 13) |
12 | WHITESPACE@[13; 14) | 12 | WHITESPACE@[13; 14) |
13 | PATH_TYPE@[14; 41) | 13 | TYPE_BOUND_LIST@[14; 41) |
14 | PATH@[14; 36) | 14 | TYPE_BOUND@[14; 36) |
15 | PATH_SEGMENT@[14; 36) | 15 | PATH_TYPE@[14; 36) |
16 | NAME_REF@[14; 22) | 16 | PATH@[14; 36) |
17 | IDENT@[14; 22) "Iterator" | 17 | PATH_SEGMENT@[14; 36) |
18 | TYPE_ARG_LIST@[22; 36) | 18 | NAME_REF@[14; 22) |
19 | L_ANGLE@[22; 23) | 19 | IDENT@[14; 22) "Iterator" |
20 | ASSOC_TYPE_ARG@[23; 35) | 20 | TYPE_ARG_LIST@[22; 36) |
21 | NAME_REF@[23; 27) | 21 | L_ANGLE@[22; 23) |
22 | IDENT@[23; 27) "Item" | 22 | ASSOC_TYPE_ARG@[23; 35) |
23 | EQ@[27; 28) | 23 | NAME_REF@[23; 27) |
24 | PATH_TYPE@[28; 35) | 24 | IDENT@[23; 27) "Item" |
25 | PATH@[28; 35) | 25 | EQ@[27; 28) |
26 | PATH_SEGMENT@[28; 35) | 26 | PATH_TYPE@[28; 35) |
27 | NAME_REF@[28; 31) | 27 | PATH@[28; 35) |
28 | IDENT@[28; 31) "Foo" | 28 | PATH_SEGMENT@[28; 35) |
29 | TYPE_ARG_LIST@[31; 35) | 29 | NAME_REF@[28; 31) |
30 | L_ANGLE@[31; 32) | 30 | IDENT@[28; 31) "Foo" |
31 | LIFETIME_ARG@[32; 34) | 31 | TYPE_ARG_LIST@[31; 35) |
32 | LIFETIME@[32; 34) "'a" | 32 | L_ANGLE@[31; 32) |
33 | R_ANGLE@[34; 35) | 33 | LIFETIME_ARG@[32; 34) |
34 | R_ANGLE@[35; 36) | 34 | LIFETIME@[32; 34) "'a" |
35 | R_ANGLE@[34; 35) | ||
36 | R_ANGLE@[35; 36) | ||
35 | WHITESPACE@[36; 37) | 37 | WHITESPACE@[36; 37) |
36 | PLUS@[37; 38) | 38 | PLUS@[37; 38) |
37 | WHITESPACE@[38; 39) | 39 | WHITESPACE@[38; 39) |
38 | LIFETIME@[39; 41) "'a" | 40 | TYPE_BOUND@[39; 41) |
41 | LIFETIME@[39; 41) "'a" | ||
39 | SEMI@[41; 42) | 42 | SEMI@[41; 42) |
40 | WHITESPACE@[42; 43) | 43 | WHITESPACE@[42; 43) |
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0041_trait_item.rs b/crates/ra_syntax/tests/data/parser/inline/ok/0041_trait_item.rs index 4385afca9..32761dd03 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0041_trait_item.rs +++ b/crates/ra_syntax/tests/data/parser/inline/ok/0041_trait_item.rs | |||
@@ -1 +1,2 @@ | |||
1 | trait T<U>: Hash + Clone where U: Copy {} | 1 | trait T<U>: Hash + Clone where U: Copy {} |
2 | trait X<U: Debug + Display>: Hash + Clone where U: Copy {} | ||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0041_trait_item.txt b/crates/ra_syntax/tests/data/parser/inline/ok/0041_trait_item.txt index 333a737ec..56cfea5b3 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0041_trait_item.txt +++ b/crates/ra_syntax/tests/data/parser/inline/ok/0041_trait_item.txt | |||
@@ -1,4 +1,4 @@ | |||
1 | SOURCE_FILE@[0; 42) | 1 | SOURCE_FILE@[0; 101) |
2 | TRAIT_DEF@[0; 41) | 2 | TRAIT_DEF@[0; 41) |
3 | TRAIT_KW@[0; 5) | 3 | TRAIT_KW@[0; 5) |
4 | WHITESPACE@[5; 6) | 4 | WHITESPACE@[5; 6) |
@@ -12,19 +12,22 @@ SOURCE_FILE@[0; 42) | |||
12 | R_ANGLE@[9; 10) | 12 | R_ANGLE@[9; 10) |
13 | COLON@[10; 11) | 13 | COLON@[10; 11) |
14 | WHITESPACE@[11; 12) | 14 | WHITESPACE@[11; 12) |
15 | PATH_TYPE@[12; 24) | 15 | TYPE_BOUND_LIST@[12; 24) |
16 | PATH@[12; 16) | 16 | TYPE_BOUND@[12; 16) |
17 | PATH_SEGMENT@[12; 16) | 17 | PATH_TYPE@[12; 16) |
18 | NAME_REF@[12; 16) | 18 | PATH@[12; 16) |
19 | IDENT@[12; 16) "Hash" | 19 | PATH_SEGMENT@[12; 16) |
20 | NAME_REF@[12; 16) | ||
21 | IDENT@[12; 16) "Hash" | ||
20 | WHITESPACE@[16; 17) | 22 | WHITESPACE@[16; 17) |
21 | PLUS@[17; 18) | 23 | PLUS@[17; 18) |
22 | WHITESPACE@[18; 19) | 24 | WHITESPACE@[18; 19) |
23 | PATH_TYPE@[19; 24) | 25 | TYPE_BOUND@[19; 24) |
24 | PATH@[19; 24) | 26 | PATH_TYPE@[19; 24) |
25 | PATH_SEGMENT@[19; 24) | 27 | PATH@[19; 24) |
26 | NAME_REF@[19; 24) | 28 | PATH_SEGMENT@[19; 24) |
27 | IDENT@[19; 24) "Clone" | 29 | NAME_REF@[19; 24) |
30 | IDENT@[19; 24) "Clone" | ||
28 | WHITESPACE@[24; 25) | 31 | WHITESPACE@[24; 25) |
29 | WHERE_CLAUSE@[25; 38) | 32 | WHERE_CLAUSE@[25; 38) |
30 | WHERE_KW@[25; 30) | 33 | WHERE_KW@[25; 30) |
@@ -37,13 +40,86 @@ SOURCE_FILE@[0; 42) | |||
37 | IDENT@[31; 32) "U" | 40 | IDENT@[31; 32) "U" |
38 | COLON@[32; 33) | 41 | COLON@[32; 33) |
39 | WHITESPACE@[33; 34) | 42 | WHITESPACE@[33; 34) |
40 | PATH_TYPE@[34; 38) | 43 | TYPE_BOUND_LIST@[34; 38) |
41 | PATH@[34; 38) | 44 | TYPE_BOUND@[34; 38) |
42 | PATH_SEGMENT@[34; 38) | 45 | PATH_TYPE@[34; 38) |
43 | NAME_REF@[34; 38) | 46 | PATH@[34; 38) |
44 | IDENT@[34; 38) "Copy" | 47 | PATH_SEGMENT@[34; 38) |
48 | NAME_REF@[34; 38) | ||
49 | IDENT@[34; 38) "Copy" | ||
45 | WHITESPACE@[38; 39) | 50 | WHITESPACE@[38; 39) |
46 | ITEM_LIST@[39; 41) | 51 | ITEM_LIST@[39; 41) |
47 | L_CURLY@[39; 40) | 52 | L_CURLY@[39; 40) |
48 | R_CURLY@[40; 41) | 53 | R_CURLY@[40; 41) |
49 | WHITESPACE@[41; 42) | 54 | WHITESPACE@[41; 42) |
55 | TRAIT_DEF@[42; 100) | ||
56 | TRAIT_KW@[42; 47) | ||
57 | WHITESPACE@[47; 48) | ||
58 | NAME@[48; 49) | ||
59 | IDENT@[48; 49) "X" | ||
60 | TYPE_PARAM_LIST@[49; 69) | ||
61 | L_ANGLE@[49; 50) | ||
62 | TYPE_PARAM@[50; 68) | ||
63 | NAME@[50; 51) | ||
64 | IDENT@[50; 51) "U" | ||
65 | COLON@[51; 52) | ||
66 | WHITESPACE@[52; 53) | ||
67 | TYPE_BOUND_LIST@[53; 68) | ||
68 | TYPE_BOUND@[53; 58) | ||
69 | PATH_TYPE@[53; 58) | ||
70 | PATH@[53; 58) | ||
71 | PATH_SEGMENT@[53; 58) | ||
72 | NAME_REF@[53; 58) | ||
73 | IDENT@[53; 58) "Debug" | ||
74 | WHITESPACE@[58; 59) | ||
75 | PLUS@[59; 60) | ||
76 | WHITESPACE@[60; 61) | ||
77 | TYPE_BOUND@[61; 68) | ||
78 | PATH_TYPE@[61; 68) | ||
79 | PATH@[61; 68) | ||
80 | PATH_SEGMENT@[61; 68) | ||
81 | NAME_REF@[61; 68) | ||
82 | IDENT@[61; 68) "Display" | ||
83 | R_ANGLE@[68; 69) | ||
84 | COLON@[69; 70) | ||
85 | WHITESPACE@[70; 71) | ||
86 | TYPE_BOUND_LIST@[71; 83) | ||
87 | TYPE_BOUND@[71; 75) | ||
88 | PATH_TYPE@[71; 75) | ||
89 | PATH@[71; 75) | ||
90 | PATH_SEGMENT@[71; 75) | ||
91 | NAME_REF@[71; 75) | ||
92 | IDENT@[71; 75) "Hash" | ||
93 | WHITESPACE@[75; 76) | ||
94 | PLUS@[76; 77) | ||
95 | WHITESPACE@[77; 78) | ||
96 | TYPE_BOUND@[78; 83) | ||
97 | PATH_TYPE@[78; 83) | ||
98 | PATH@[78; 83) | ||
99 | PATH_SEGMENT@[78; 83) | ||
100 | NAME_REF@[78; 83) | ||
101 | IDENT@[78; 83) "Clone" | ||
102 | WHITESPACE@[83; 84) | ||
103 | WHERE_CLAUSE@[84; 97) | ||
104 | WHERE_KW@[84; 89) | ||
105 | WHITESPACE@[89; 90) | ||
106 | WHERE_PRED@[90; 97) | ||
107 | PATH_TYPE@[90; 91) | ||
108 | PATH@[90; 91) | ||
109 | PATH_SEGMENT@[90; 91) | ||
110 | NAME_REF@[90; 91) | ||
111 | IDENT@[90; 91) "U" | ||
112 | COLON@[91; 92) | ||
113 | WHITESPACE@[92; 93) | ||
114 | TYPE_BOUND_LIST@[93; 97) | ||
115 | TYPE_BOUND@[93; 97) | ||
116 | PATH_TYPE@[93; 97) | ||
117 | PATH@[93; 97) | ||
118 | PATH_SEGMENT@[93; 97) | ||
119 | NAME_REF@[93; 97) | ||
120 | IDENT@[93; 97) "Copy" | ||
121 | WHITESPACE@[97; 98) | ||
122 | ITEM_LIST@[98; 100) | ||
123 | L_CURLY@[98; 99) | ||
124 | R_CURLY@[99; 100) | ||
125 | WHITESPACE@[100; 101) | ||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0045_param_list_opt_patterns.txt b/crates/ra_syntax/tests/data/parser/inline/ok/0045_param_list_opt_patterns.txt index 2ce7a6714..3786a787a 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0045_param_list_opt_patterns.txt +++ b/crates/ra_syntax/tests/data/parser/inline/ok/0045_param_list_opt_patterns.txt | |||
@@ -11,29 +11,31 @@ SOURCE_FILE@[0; 35) | |||
11 | IDENT@[7; 8) "F" | 11 | IDENT@[7; 8) "F" |
12 | COLON@[8; 9) | 12 | COLON@[8; 9) |
13 | WHITESPACE@[9; 10) | 13 | WHITESPACE@[9; 10) |
14 | PATH_TYPE@[10; 29) | 14 | TYPE_BOUND_LIST@[10; 29) |
15 | PATH@[10; 29) | 15 | TYPE_BOUND@[10; 29) |
16 | PATH_SEGMENT@[10; 29) | 16 | PATH_TYPE@[10; 29) |
17 | NAME_REF@[10; 15) | 17 | PATH@[10; 29) |
18 | IDENT@[10; 15) "FnMut" | 18 | PATH_SEGMENT@[10; 29) |
19 | PARAM_LIST@[15; 29) | 19 | NAME_REF@[10; 15) |
20 | L_PAREN@[15; 16) | 20 | IDENT@[10; 15) "FnMut" |
21 | PARAM@[16; 28) | 21 | PARAM_LIST@[15; 29) |
22 | REFERENCE_TYPE@[16; 28) | 22 | L_PAREN@[15; 16) |
23 | AMP@[16; 17) | 23 | PARAM@[16; 28) |
24 | MUT_KW@[17; 20) | 24 | REFERENCE_TYPE@[16; 28) |
25 | WHITESPACE@[20; 21) | 25 | AMP@[16; 17) |
26 | PATH_TYPE@[21; 28) | 26 | MUT_KW@[17; 20) |
27 | PATH@[21; 28) | 27 | WHITESPACE@[20; 21) |
28 | PATH_SEGMENT@[21; 28) | 28 | PATH_TYPE@[21; 28) |
29 | NAME_REF@[21; 24) | 29 | PATH@[21; 28) |
30 | IDENT@[21; 24) "Foo" | 30 | PATH_SEGMENT@[21; 28) |
31 | TYPE_ARG_LIST@[24; 28) | 31 | NAME_REF@[21; 24) |
32 | L_ANGLE@[24; 25) | 32 | IDENT@[21; 24) "Foo" |
33 | LIFETIME_ARG@[25; 27) | 33 | TYPE_ARG_LIST@[24; 28) |
34 | LIFETIME@[25; 27) "'a" | 34 | L_ANGLE@[24; 25) |
35 | R_ANGLE@[27; 28) | 35 | LIFETIME_ARG@[25; 27) |
36 | R_PAREN@[28; 29) | 36 | LIFETIME@[25; 27) "'a" |
37 | R_ANGLE@[27; 28) | ||
38 | R_PAREN@[28; 29) | ||
37 | R_ANGLE@[29; 30) | 39 | R_ANGLE@[29; 30) |
38 | PARAM_LIST@[30; 32) | 40 | PARAM_LIST@[30; 32) |
39 | L_PAREN@[30; 31) | 41 | L_PAREN@[30; 31) |
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0048_path_type_with_bounds.txt b/crates/ra_syntax/tests/data/parser/inline/ok/0048_path_type_with_bounds.txt index 911a27ea1..a0110f555 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0048_path_type_with_bounds.txt +++ b/crates/ra_syntax/tests/data/parser/inline/ok/0048_path_type_with_bounds.txt | |||
@@ -27,7 +27,9 @@ SOURCE_FILE@[0; 27) | |||
27 | WHITESPACE@[17; 18) | 27 | WHITESPACE@[17; 18) |
28 | PLUS@[18; 19) | 28 | PLUS@[18; 19) |
29 | WHITESPACE@[19; 20) | 29 | WHITESPACE@[19; 20) |
30 | LIFETIME@[20; 22) "'f" | 30 | TYPE_BOUND_LIST@[20; 22) |
31 | TYPE_BOUND@[20; 22) | ||
32 | LIFETIME@[20; 22) "'f" | ||
31 | R_ANGLE@[22; 23) | 33 | R_ANGLE@[22; 23) |
32 | WHITESPACE@[23; 24) | 34 | WHITESPACE@[23; 24) |
33 | BLOCK@[24; 26) | 35 | BLOCK@[24; 26) |
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0056_where_clause.txt b/crates/ra_syntax/tests/data/parser/inline/ok/0056_where_clause.txt index 68485dc0b..e04b61eb3 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0056_where_clause.txt +++ b/crates/ra_syntax/tests/data/parser/inline/ok/0056_where_clause.txt | |||
@@ -30,22 +30,26 @@ SOURCE_FILE@[0; 116) | |||
30 | IDENT@[34; 35) "T" | 30 | IDENT@[34; 35) "T" |
31 | COLON@[35; 36) | 31 | COLON@[35; 36) |
32 | WHITESPACE@[36; 37) | 32 | WHITESPACE@[36; 37) |
33 | PATH_TYPE@[37; 59) | 33 | TYPE_BOUND_LIST@[37; 59) |
34 | PATH@[37; 42) | 34 | TYPE_BOUND@[37; 42) |
35 | PATH_SEGMENT@[37; 42) | 35 | PATH_TYPE@[37; 42) |
36 | NAME_REF@[37; 42) | 36 | PATH@[37; 42) |
37 | IDENT@[37; 42) "Clone" | 37 | PATH_SEGMENT@[37; 42) |
38 | NAME_REF@[37; 42) | ||
39 | IDENT@[37; 42) "Clone" | ||
38 | WHITESPACE@[42; 43) | 40 | WHITESPACE@[42; 43) |
39 | PLUS@[43; 44) | 41 | PLUS@[43; 44) |
40 | WHITESPACE@[44; 45) | 42 | WHITESPACE@[44; 45) |
41 | PATH_TYPE@[45; 59) | 43 | TYPE_BOUND@[45; 49) |
42 | PATH@[45; 49) | 44 | PATH_TYPE@[45; 49) |
43 | PATH_SEGMENT@[45; 49) | 45 | PATH@[45; 49) |
44 | NAME_REF@[45; 49) | 46 | PATH_SEGMENT@[45; 49) |
45 | IDENT@[45; 49) "Copy" | 47 | NAME_REF@[45; 49) |
46 | WHITESPACE@[49; 50) | 48 | IDENT@[45; 49) "Copy" |
47 | PLUS@[50; 51) | 49 | WHITESPACE@[49; 50) |
48 | WHITESPACE@[51; 52) | 50 | PLUS@[50; 51) |
51 | WHITESPACE@[51; 52) | ||
52 | TYPE_BOUND@[52; 59) | ||
49 | LIFETIME@[52; 59) "'static" | 53 | LIFETIME@[52; 59) "'static" |
50 | COMMA@[59; 60) | 54 | COMMA@[59; 60) |
51 | WHITESPACE@[60; 64) | 55 | WHITESPACE@[60; 64) |
@@ -62,7 +66,9 @@ SOURCE_FILE@[0; 116) | |||
62 | IDENT@[74; 78) "Item" | 66 | IDENT@[74; 78) "Item" |
63 | COLON@[78; 79) | 67 | COLON@[78; 79) |
64 | WHITESPACE@[79; 80) | 68 | WHITESPACE@[79; 80) |
65 | LIFETIME@[80; 82) "'a" | 69 | TYPE_BOUND_LIST@[80; 82) |
70 | TYPE_BOUND@[80; 82) | ||
71 | LIFETIME@[80; 82) "'a" | ||
66 | COMMA@[82; 83) | 72 | COMMA@[82; 83) |
67 | WHITESPACE@[83; 87) | 73 | WHITESPACE@[83; 87) |
68 | WHERE_PRED@[87; 112) | 74 | WHERE_PRED@[87; 112) |
@@ -91,7 +97,9 @@ SOURCE_FILE@[0; 116) | |||
91 | IDENT@[104; 108) "Item" | 97 | IDENT@[104; 108) "Item" |
92 | COLON@[108; 109) | 98 | COLON@[108; 109) |
93 | WHITESPACE@[109; 110) | 99 | WHITESPACE@[109; 110) |
94 | LIFETIME@[110; 112) "'a" | 100 | TYPE_BOUND_LIST@[110; 112) |
101 | TYPE_BOUND@[110; 112) | ||
102 | LIFETIME@[110; 112) "'a" | ||
95 | WHITESPACE@[112; 113) | 103 | WHITESPACE@[112; 113) |
96 | BLOCK@[113; 115) | 104 | BLOCK@[113; 115) |
97 | L_CURLY@[113; 114) | 105 | L_CURLY@[113; 114) |
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0065_dyn_trait_type.txt b/crates/ra_syntax/tests/data/parser/inline/ok/0065_dyn_trait_type.txt index f6a0967f2..e33d8ada1 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0065_dyn_trait_type.txt +++ b/crates/ra_syntax/tests/data/parser/inline/ok/0065_dyn_trait_type.txt | |||
@@ -10,31 +10,34 @@ SOURCE_FILE@[0; 42) | |||
10 | DYN_TRAIT_TYPE@[9; 40) | 10 | DYN_TRAIT_TYPE@[9; 40) |
11 | DYN_KW@[9; 12) | 11 | DYN_KW@[9; 12) |
12 | WHITESPACE@[12; 13) | 12 | WHITESPACE@[12; 13) |
13 | PATH_TYPE@[13; 40) | 13 | TYPE_BOUND_LIST@[13; 40) |
14 | PATH@[13; 35) | 14 | TYPE_BOUND@[13; 35) |
15 | PATH_SEGMENT@[13; 35) | 15 | PATH_TYPE@[13; 35) |
16 | NAME_REF@[13; 21) | 16 | PATH@[13; 35) |
17 | IDENT@[13; 21) "Iterator" | 17 | PATH_SEGMENT@[13; 35) |
18 | TYPE_ARG_LIST@[21; 35) | 18 | NAME_REF@[13; 21) |
19 | L_ANGLE@[21; 22) | 19 | IDENT@[13; 21) "Iterator" |
20 | ASSOC_TYPE_ARG@[22; 34) | 20 | TYPE_ARG_LIST@[21; 35) |
21 | NAME_REF@[22; 26) | 21 | L_ANGLE@[21; 22) |
22 | IDENT@[22; 26) "Item" | 22 | ASSOC_TYPE_ARG@[22; 34) |
23 | EQ@[26; 27) | 23 | NAME_REF@[22; 26) |
24 | PATH_TYPE@[27; 34) | 24 | IDENT@[22; 26) "Item" |
25 | PATH@[27; 34) | 25 | EQ@[26; 27) |
26 | PATH_SEGMENT@[27; 34) | 26 | PATH_TYPE@[27; 34) |
27 | NAME_REF@[27; 30) | 27 | PATH@[27; 34) |
28 | IDENT@[27; 30) "Foo" | 28 | PATH_SEGMENT@[27; 34) |
29 | TYPE_ARG_LIST@[30; 34) | 29 | NAME_REF@[27; 30) |
30 | L_ANGLE@[30; 31) | 30 | IDENT@[27; 30) "Foo" |
31 | LIFETIME_ARG@[31; 33) | 31 | TYPE_ARG_LIST@[30; 34) |
32 | LIFETIME@[31; 33) "'a" | 32 | L_ANGLE@[30; 31) |
33 | R_ANGLE@[33; 34) | 33 | LIFETIME_ARG@[31; 33) |
34 | R_ANGLE@[34; 35) | 34 | LIFETIME@[31; 33) "'a" |
35 | R_ANGLE@[33; 34) | ||
36 | R_ANGLE@[34; 35) | ||
35 | WHITESPACE@[35; 36) | 37 | WHITESPACE@[35; 36) |
36 | PLUS@[36; 37) | 38 | PLUS@[36; 37) |
37 | WHITESPACE@[37; 38) | 39 | WHITESPACE@[37; 38) |
38 | LIFETIME@[38; 40) "'a" | 40 | TYPE_BOUND@[38; 40) |
41 | LIFETIME@[38; 40) "'a" | ||
39 | SEMI@[40; 41) | 42 | SEMI@[40; 41) |
40 | WHITESPACE@[41; 42) | 43 | WHITESPACE@[41; 42) |
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0076_function_where_clause.txt b/crates/ra_syntax/tests/data/parser/inline/ok/0076_function_where_clause.txt index b58d09e35..1603b531e 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0076_function_where_clause.txt +++ b/crates/ra_syntax/tests/data/parser/inline/ok/0076_function_where_clause.txt | |||
@@ -25,11 +25,13 @@ SOURCE_FILE@[0; 29) | |||
25 | IDENT@[18; 19) "T" | 25 | IDENT@[18; 19) "T" |
26 | COLON@[19; 20) | 26 | COLON@[19; 20) |
27 | WHITESPACE@[20; 21) | 27 | WHITESPACE@[20; 21) |
28 | PATH_TYPE@[21; 25) | 28 | TYPE_BOUND_LIST@[21; 25) |
29 | PATH@[21; 25) | 29 | TYPE_BOUND@[21; 25) |
30 | PATH_SEGMENT@[21; 25) | 30 | PATH_TYPE@[21; 25) |
31 | NAME_REF@[21; 25) | 31 | PATH@[21; 25) |
32 | IDENT@[21; 25) "Copy" | 32 | PATH_SEGMENT@[21; 25) |
33 | NAME_REF@[21; 25) | ||
34 | IDENT@[21; 25) "Copy" | ||
33 | WHITESPACE@[25; 26) | 35 | WHITESPACE@[25; 26) |
34 | BLOCK@[26; 28) | 36 | BLOCK@[26; 28) |
35 | L_CURLY@[26; 27) | 37 | L_CURLY@[26; 27) |
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0081_for_type.txt b/crates/ra_syntax/tests/data/parser/inline/ok/0081_for_type.txt index 568f61fb2..36c856cd7 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0081_for_type.txt +++ b/crates/ra_syntax/tests/data/parser/inline/ok/0081_for_type.txt | |||
@@ -80,11 +80,13 @@ SOURCE_FILE@[0; 135) | |||
80 | IDENT@[65; 66) "T" | 80 | IDENT@[65; 66) "T" |
81 | COLON@[66; 67) | 81 | COLON@[66; 67) |
82 | WHITESPACE@[67; 68) | 82 | WHITESPACE@[67; 68) |
83 | PATH_TYPE@[68; 76) | 83 | TYPE_BOUND_LIST@[68; 76) |
84 | PATH@[68; 76) | 84 | TYPE_BOUND@[68; 76) |
85 | PATH_SEGMENT@[68; 76) | 85 | PATH_TYPE@[68; 76) |
86 | NAME_REF@[68; 76) | 86 | PATH@[68; 76) |
87 | IDENT@[68; 76) "Iterator" | 87 | PATH_SEGMENT@[68; 76) |
88 | NAME_REF@[68; 76) | ||
89 | IDENT@[68; 76) "Iterator" | ||
88 | WHITESPACE@[76; 77) | 90 | WHITESPACE@[76; 77) |
89 | BLOCK@[77; 79) | 91 | BLOCK@[77; 79) |
90 | L_CURLY@[77; 78) | 92 | L_CURLY@[77; 78) |
@@ -143,11 +145,13 @@ SOURCE_FILE@[0; 135) | |||
143 | IDENT@[120; 121) "T" | 145 | IDENT@[120; 121) "T" |
144 | COLON@[121; 122) | 146 | COLON@[121; 122) |
145 | WHITESPACE@[122; 123) | 147 | WHITESPACE@[122; 123) |
146 | PATH_TYPE@[123; 131) | 148 | TYPE_BOUND_LIST@[123; 131) |
147 | PATH@[123; 131) | 149 | TYPE_BOUND@[123; 131) |
148 | PATH_SEGMENT@[123; 131) | 150 | PATH_TYPE@[123; 131) |
149 | NAME_REF@[123; 131) | 151 | PATH@[123; 131) |
150 | IDENT@[123; 131) "Iterator" | 152 | PATH_SEGMENT@[123; 131) |
153 | NAME_REF@[123; 131) | ||
154 | IDENT@[123; 131) "Iterator" | ||
151 | WHITESPACE@[131; 132) | 155 | WHITESPACE@[131; 132) |
152 | BLOCK@[132; 134) | 156 | BLOCK@[132; 134) |
153 | L_CURLY@[132; 133) | 157 | L_CURLY@[132; 133) |
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0114_tuple_struct_where.txt b/crates/ra_syntax/tests/data/parser/inline/ok/0114_tuple_struct_where.txt index 4f439f21c..dec038fc1 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0114_tuple_struct_where.txt +++ b/crates/ra_syntax/tests/data/parser/inline/ok/0114_tuple_struct_where.txt | |||
@@ -31,11 +31,13 @@ SOURCE_FILE@[0; 53) | |||
31 | IDENT@[24; 25) "T" | 31 | IDENT@[24; 25) "T" |
32 | COLON@[25; 26) | 32 | COLON@[25; 26) |
33 | WHITESPACE@[26; 27) | 33 | WHITESPACE@[26; 27) |
34 | PATH_TYPE@[27; 32) | 34 | TYPE_BOUND_LIST@[27; 32) |
35 | PATH@[27; 32) | 35 | TYPE_BOUND@[27; 32) |
36 | PATH_SEGMENT@[27; 32) | 36 | PATH_TYPE@[27; 32) |
37 | NAME_REF@[27; 32) | 37 | PATH@[27; 32) |
38 | IDENT@[27; 32) "Clone" | 38 | PATH_SEGMENT@[27; 32) |
39 | NAME_REF@[27; 32) | ||
40 | IDENT@[27; 32) "Clone" | ||
39 | SEMI@[32; 33) | 41 | SEMI@[32; 33) |
40 | WHITESPACE@[33; 34) | 42 | WHITESPACE@[33; 34) |
41 | STRUCT_DEF@[34; 52) | 43 | STRUCT_DEF@[34; 52) |