diff options
Diffstat (limited to 'crates/ra_syntax/test_data/parser')
51 files changed, 1177 insertions, 336 deletions
diff --git a/crates/ra_syntax/test_data/parser/err/0004_use_path_bad_segment.rast b/crates/ra_syntax/test_data/parser/err/0004_use_path_bad_segment.rast index 8c6b89dc2..b3bcf472a 100644 --- a/crates/ra_syntax/test_data/parser/err/0004_use_path_bad_segment.rast +++ b/crates/ra_syntax/test_data/parser/err/0004_use_path_bad_segment.rast | |||
@@ -9,8 +9,7 @@ [email protected] | |||
9 | [email protected] | 9 | [email protected] |
10 | [email protected] "foo" | 10 | [email protected] "foo" |
11 | [email protected] "::" | 11 | [email protected] "::" |
12 | [email protected] | 12 | [email protected] |
13 | [email protected] | 13 | [email protected] "92" |
14 | [email protected] "92" | ||
15 | [email protected] ";" | 14 | [email protected] ";" |
16 | error 9..9: expected identifier | 15 | error 9..9: expected identifier |
diff --git a/crates/ra_syntax/test_data/parser/err/0024_many_type_parens.rast b/crates/ra_syntax/test_data/parser/err/0024_many_type_parens.rast index 7c957fdde..48610a5eb 100644 --- a/crates/ra_syntax/test_data/parser/err/0024_many_type_parens.rast +++ b/crates/ra_syntax/test_data/parser/err/0024_many_type_parens.rast | |||
@@ -180,44 +180,45 @@ [email protected] | |||
180 | [email protected] | 180 | [email protected] |
181 | [email protected] | 181 | [email protected] |
182 | [email protected] "(" | 182 | [email protected] "(" |
183 | [email protected] | 183 | [email protected] |
184 | [email protected] | 184 | [email protected] "for" |
185 | [email protected] | 185 | [email protected] |
186 | [email protected] | 186 | [email protected] |
187 | [email protected] | 187 | [email protected] |
188 | [email protected] | 188 | [email protected] "<" |
189 | [email protected] "for" | 189 | [email protected] |
190 | [email protected] | 190 | [email protected] "\'a" |
191 | [email protected] "<" | 191 | [email protected] ">" |
192 | [email protected] | 192 | [email protected] " " |
193 | [email protected] "\'a" | 193 | [email protected] |
194 | [email protected] ">" | 194 | [email protected] |
195 | [email protected] " " | 195 | [email protected] |
196 | [email protected] | ||
196 | [email protected] | 197 | [email protected] |
197 | [email protected] | 198 | [email protected] |
198 | [email protected] | 199 | [email protected] |
199 | [email protected] | 200 | [email protected] |
200 | [email protected] "Trait" | 201 | [email protected] "Trait" |
201 | [email protected] "<" | 202 | [email protected] "<" |
202 | [email protected] | 203 | [email protected] |
203 | [email protected] "\'a" | 204 | [email protected] "\'a" |
204 | [email protected] ">" | 205 | [email protected] ">" |
205 | [email protected] | 206 | [email protected] |
206 | [email protected] ")" | 207 | [email protected] ")" |
207 | [email protected] " " | 208 | [email protected] " " |
208 | [email protected] "+" | 209 | [email protected] "+" |
209 | [email protected] " " | 210 | [email protected] " " |
210 | [email protected] | 211 | [email protected] |
211 | [email protected] "(" | 212 | [email protected] "(" |
212 | [email protected] | 213 | [email protected] |
213 | [email protected] | 214 | [email protected] |
214 | [email protected] | 215 | [email protected] |
215 | [email protected] | 216 | [email protected] |
216 | [email protected] "Copy" | 217 | [email protected] "Copy" |
217 | [email protected] ")" | 218 | [email protected] ")" |
218 | [email protected] ">" | 219 | [email protected] ">" |
219 | [email protected] | 220 | [email protected] |
220 | [email protected] ";" | 221 | [email protected] ";" |
221 | [email protected] "\n " | 222 | [email protected] "\n " |
222 | [email protected] | 223 | [email protected] |
223 | [email protected] "let" | 224 | [email protected] "let" |
@@ -302,13 +303,12 @@ error 146..146: expected expression | |||
302 | error 147..147: expected SEMICOLON | 303 | error 147..147: expected SEMICOLON |
303 | error 148..148: expected expression | 304 | error 148..148: expected expression |
304 | error 149..149: expected SEMICOLON | 305 | error 149..149: expected SEMICOLON |
305 | error 154..154: expected pattern | 306 | error 155..155: expected type |
306 | error 155..155: expected IN_KW | 307 | error 158..158: expected IN_KW |
307 | error 155..155: expected expression | ||
308 | error 157..157: expected a block | ||
309 | error 165..165: expected expression | 308 | error 165..165: expected expression |
310 | error 168..168: expected expression | 309 | error 168..168: expected expression |
311 | error 179..179: expected expression | 310 | error 179..179: expected expression |
311 | error 180..180: expected a block | ||
312 | error 180..180: expected COMMA | 312 | error 180..180: expected COMMA |
313 | error 180..180: expected expression | 313 | error 180..180: expected expression |
314 | error 180..180: expected R_PAREN | 314 | error 180..180: expected R_PAREN |
diff --git a/crates/ra_syntax/test_data/parser/err/0027_incomplere_where_for.rast b/crates/ra_syntax/test_data/parser/err/0027_incomplere_where_for.rast index 568a4cc02..4d6461d1e 100644 --- a/crates/ra_syntax/test_data/parser/err/0027_incomplere_where_for.rast +++ b/crates/ra_syntax/test_data/parser/err/0027_incomplere_where_for.rast | |||
@@ -12,17 +12,16 @@ [email protected] | |||
12 | [email protected] "where" | 12 | [email protected] "where" |
13 | [email protected] " " | 13 | [email protected] " " |
14 | [email protected] | 14 | [email protected] |
15 | [email protected] | 15 | [email protected] "for" |
16 | [email protected] "for" | 16 | [email protected] |
17 | [email protected] | 17 | [email protected] "<" |
18 | [email protected] "<" | 18 | [email protected] |
19 | [email protected] | 19 | [email protected] "\'a" |
20 | [email protected] "\'a" | 20 | [email protected] ">" |
21 | [email protected] ">" | ||
22 | [email protected] "\n" | 21 | [email protected] "\n" |
23 | [email protected] | 22 | [email protected] |
24 | [email protected] "{" | 23 | [email protected] "{" |
25 | [email protected] "}" | 24 | [email protected] "}" |
26 | [email protected] "\n" | 25 | [email protected] "\n" |
27 | error 26..26: expected a path | 26 | error 26..26: expected type |
28 | error 26..26: expected colon | 27 | error 26..26: expected colon |
diff --git a/crates/ra_syntax/test_data/parser/err/0043_default_const.rast b/crates/ra_syntax/test_data/parser/err/0043_default_const.rast new file mode 100644 index 000000000..8eb583ef8 --- /dev/null +++ b/crates/ra_syntax/test_data/parser/err/0043_default_const.rast | |||
@@ -0,0 +1,40 @@ | |||
1 | [email protected] | ||
2 | [email protected] | ||
3 | [email protected] "trait" | ||
4 | [email protected] " " | ||
5 | [email protected] | ||
6 | [email protected] "T" | ||
7 | [email protected] " " | ||
8 | [email protected] | ||
9 | [email protected] "{" | ||
10 | [email protected] "\n " | ||
11 | [email protected] | ||
12 | [email protected] | ||
13 | [email protected] | ||
14 | [email protected] | ||
15 | [email protected] "default" | ||
16 | [email protected] " " | ||
17 | [email protected] | ||
18 | [email protected] "const" | ||
19 | [email protected] " " | ||
20 | [email protected] | ||
21 | [email protected] "f" | ||
22 | [email protected] ":" | ||
23 | [email protected] " " | ||
24 | [email protected] | ||
25 | [email protected] | ||
26 | [email protected] | ||
27 | [email protected] | ||
28 | [email protected] "u8" | ||
29 | [email protected] " " | ||
30 | [email protected] "=" | ||
31 | [email protected] " " | ||
32 | [email protected] | ||
33 | [email protected] "0" | ||
34 | [email protected] ";" | ||
35 | [email protected] "\n" | ||
36 | [email protected] "}" | ||
37 | [email protected] "\n" | ||
38 | error 19..19: expected BANG | ||
39 | error 19..19: expected `{`, `[`, `(` | ||
40 | error 19..19: expected SEMICOLON | ||
diff --git a/crates/ra_syntax/test_data/parser/err/0043_default_const.rs b/crates/ra_syntax/test_data/parser/err/0043_default_const.rs new file mode 100644 index 000000000..80f15474a --- /dev/null +++ b/crates/ra_syntax/test_data/parser/err/0043_default_const.rs | |||
@@ -0,0 +1,3 @@ | |||
1 | trait T { | ||
2 | default const f: u8 = 0; | ||
3 | } | ||
diff --git a/crates/ra_syntax/test_data/parser/err/0044_unexpected_for_type.rast b/crates/ra_syntax/test_data/parser/err/0044_unexpected_for_type.rast new file mode 100644 index 000000000..cb90f28bc --- /dev/null +++ b/crates/ra_syntax/test_data/parser/err/0044_unexpected_for_type.rast | |||
@@ -0,0 +1,240 @@ | |||
1 | [email protected] | ||
2 | [email protected] | ||
3 | [email protected] "type" | ||
4 | [email protected] " " | ||
5 | [email protected] | ||
6 | [email protected] "ForRef" | ||
7 | [email protected] " " | ||
8 | [email protected] "=" | ||
9 | [email protected] " " | ||
10 | [email protected] | ||
11 | [email protected] "for" | ||
12 | [email protected] | ||
13 | [email protected] "<" | ||
14 | [email protected] | ||
15 | [email protected] "\'a" | ||
16 | [email protected] ">" | ||
17 | [email protected] " " | ||
18 | [email protected] | ||
19 | [email protected] "&" | ||
20 | [email protected] "\'a" | ||
21 | [email protected] " " | ||
22 | [email protected] | ||
23 | [email protected] | ||
24 | [email protected] | ||
25 | [email protected] | ||
26 | [email protected] "u32" | ||
27 | [email protected] ";" | ||
28 | [email protected] "\n" | ||
29 | [email protected] | ||
30 | [email protected] "type" | ||
31 | [email protected] " " | ||
32 | [email protected] | ||
33 | [email protected] "ForTup" | ||
34 | [email protected] " " | ||
35 | [email protected] "=" | ||
36 | [email protected] " " | ||
37 | [email protected] | ||
38 | [email protected] "for" | ||
39 | [email protected] | ||
40 | [email protected] "<" | ||
41 | [email protected] | ||
42 | [email protected] "\'a" | ||
43 | [email protected] ">" | ||
44 | [email protected] " " | ||
45 | [email protected] | ||
46 | [email protected] "(" | ||
47 | [email protected] | ||
48 | [email protected] "&" | ||
49 | [email protected] "\'a" | ||
50 | [email protected] " " | ||
51 | [email protected] | ||
52 | [email protected] | ||
53 | [email protected] | ||
54 | [email protected] | ||
55 | [email protected] "u32" | ||
56 | [email protected] "," | ||
57 | [email protected] ")" | ||
58 | [email protected] ";" | ||
59 | [email protected] "\n" | ||
60 | [email protected] | ||
61 | [email protected] "type" | ||
62 | [email protected] " " | ||
63 | [email protected] | ||
64 | [email protected] "ForSlice" | ||
65 | [email protected] " " | ||
66 | [email protected] "=" | ||
67 | [email protected] " " | ||
68 | [email protected] | ||
69 | [email protected] "for" | ||
70 | [email protected] | ||
71 | [email protected] "<" | ||
72 | [email protected] | ||
73 | [email protected] "\'a" | ||
74 | [email protected] ">" | ||
75 | [email protected] " " | ||
76 | [email protected] | ||
77 | [email protected] "[" | ||
78 | [email protected] | ||
79 | [email protected] | ||
80 | [email protected] | ||
81 | [email protected] | ||
82 | [email protected] "u32" | ||
83 | [email protected] "]" | ||
84 | [email protected] ";" | ||
85 | [email protected] "\n" | ||
86 | [email protected] | ||
87 | [email protected] "type" | ||
88 | [email protected] " " | ||
89 | [email protected] | ||
90 | [email protected] "ForForFn" | ||
91 | [email protected] " " | ||
92 | [email protected] "=" | ||
93 | [email protected] " " | ||
94 | [email protected] | ||
95 | [email protected] "for" | ||
96 | [email protected] | ||
97 | [email protected] "<" | ||
98 | [email protected] | ||
99 | [email protected] "\'a" | ||
100 | [email protected] ">" | ||
101 | [email protected] " " | ||
102 | [email protected] | ||
103 | [email protected] "for" | ||
104 | [email protected] | ||
105 | [email protected] "<" | ||
106 | [email protected] | ||
107 | [email protected] "\'b" | ||
108 | [email protected] ">" | ||
109 | [email protected] " " | ||
110 | [email protected] | ||
111 | [email protected] "fn" | ||
112 | [email protected] | ||
113 | [email protected] "(" | ||
114 | [email protected] | ||
115 | [email protected] | ||
116 | [email protected] "&" | ||
117 | [email protected] "\'a" | ||
118 | [email protected] " " | ||
119 | [email protected] | ||
120 | [email protected] | ||
121 | [email protected] | ||
122 | [email protected] | ||
123 | [email protected] "i32" | ||
124 | [email protected] "," | ||
125 | [email protected] " " | ||
126 | [email protected] | ||
127 | [email protected] | ||
128 | [email protected] "&" | ||
129 | [email protected] "\'b" | ||
130 | [email protected] " " | ||
131 | [email protected] | ||
132 | [email protected] | ||
133 | [email protected] | ||
134 | [email protected] | ||
135 | [email protected] "i32" | ||
136 | [email protected] ")" | ||
137 | [email protected] ";" | ||
138 | [email protected] "\n" | ||
139 | [email protected] | ||
140 | [email protected] "fn" | ||
141 | [email protected] " " | ||
142 | [email protected] | ||
143 | [email protected] "for_for_for" | ||
144 | [email protected] | ||
145 | [email protected] "<" | ||
146 | [email protected] | ||
147 | [email protected] | ||
148 | [email protected] "T" | ||
149 | [email protected] ">" | ||
150 | [email protected] | ||
151 | [email protected] "(" | ||
152 | [email protected] ")" | ||
153 | [email protected] "\n" | ||
154 | [email protected] | ||
155 | [email protected] "where" | ||
156 | [email protected] "\n " | ||
157 | [email protected] | ||
158 | [email protected] "for" | ||
159 | [email protected] | ||
160 | [email protected] "<" | ||
161 | [email protected] | ||
162 | [email protected] "\'a" | ||
163 | [email protected] ">" | ||
164 | [email protected] " " | ||
165 | [email protected] | ||
166 | [email protected] "for" | ||
167 | [email protected] | ||
168 | [email protected] "<" | ||
169 | [email protected] | ||
170 | [email protected] "\'b" | ||
171 | [email protected] ">" | ||
172 | [email protected] " " | ||
173 | [email protected] | ||
174 | [email protected] "for" | ||
175 | [email protected] | ||
176 | [email protected] "<" | ||
177 | [email protected] | ||
178 | [email protected] "\'c" | ||
179 | [email protected] ">" | ||
180 | [email protected] " " | ||
181 | [email protected] | ||
182 | [email protected] "fn" | ||
183 | [email protected] | ||
184 | [email protected] "(" | ||
185 | [email protected] | ||
186 | [email protected] | ||
187 | [email protected] "&" | ||
188 | [email protected] "\'a" | ||
189 | [email protected] " " | ||
190 | [email protected] | ||
191 | [email protected] | ||
192 | [email protected] | ||
193 | [email protected] | ||
194 | [email protected] "T" | ||
195 | [email protected] "," | ||
196 | [email protected] " " | ||
197 | [email protected] | ||
198 | [email protected] | ||
199 | [email protected] "&" | ||
200 | [email protected] "\'b" | ||
201 | [email protected] " " | ||
202 | [email protected] | ||
203 | [email protected] | ||
204 | [email protected] | ||
205 | [email protected] | ||
206 | [email protected] "T" | ||
207 | [email protected] "," | ||
208 | [email protected] " " | ||
209 | [email protected] | ||
210 | [email protected] | ||
211 | [email protected] "&" | ||
212 | [email protected] "\'c" | ||
213 | [email protected] " " | ||
214 | [email protected] | ||
215 | [email protected] | ||
216 | [email protected] | ||
217 | [email protected] | ||
218 | [email protected] "T" | ||
219 | [email protected] ")" | ||
220 | [email protected] ":" | ||
221 | [email protected] " " | ||
222 | [email protected] | ||
223 | [email protected] | ||
224 | [email protected] | ||
225 | [email protected] | ||
226 | [email protected] | ||
227 | [email protected] | ||
228 | [email protected] "Copy" | ||
229 | [email protected] "," | ||
230 | [email protected] "\n" | ||
231 | [email protected] | ||
232 | [email protected] "{" | ||
233 | [email protected] "\n" | ||
234 | [email protected] "}" | ||
235 | [email protected] "\n" | ||
236 | error 21..21: expected a function pointer or path | ||
237 | error 52..52: expected a function pointer or path | ||
238 | error 88..88: expected a function pointer or path | ||
239 | error 119..119: expected a function pointer or path | ||
240 | error 195..195: expected a function pointer or path | ||
diff --git a/crates/ra_syntax/test_data/parser/err/0044_unexpected_for_type.rs b/crates/ra_syntax/test_data/parser/err/0044_unexpected_for_type.rs new file mode 100644 index 000000000..0e9f8ccb4 --- /dev/null +++ b/crates/ra_syntax/test_data/parser/err/0044_unexpected_for_type.rs | |||
@@ -0,0 +1,9 @@ | |||
1 | type ForRef = for<'a> &'a u32; | ||
2 | type ForTup = for<'a> (&'a u32,); | ||
3 | type ForSlice = for<'a> [u32]; | ||
4 | type ForForFn = for<'a> for<'b> fn(&'a i32, &'b i32); | ||
5 | fn for_for_for<T>() | ||
6 | where | ||
7 | for<'a> for<'b> for<'c> fn(&'a T, &'b T, &'c T): Copy, | ||
8 | { | ||
9 | } | ||
diff --git a/crates/ra_syntax/test_data/parser/fragments/expr/err/0000_truncated_add.rast b/crates/ra_syntax/test_data/parser/fragments/expr/err/0000_truncated_add.rast new file mode 100644 index 000000000..5df7507e2 --- /dev/null +++ b/crates/ra_syntax/test_data/parser/fragments/expr/err/0000_truncated_add.rast | |||
@@ -0,0 +1 @@ | |||
ERROR | |||
diff --git a/crates/ra_syntax/test_data/parser/fragments/expr/err/0000_truncated_add.rs b/crates/ra_syntax/test_data/parser/fragments/expr/err/0000_truncated_add.rs new file mode 100644 index 000000000..ca49acb07 --- /dev/null +++ b/crates/ra_syntax/test_data/parser/fragments/expr/err/0000_truncated_add.rs | |||
@@ -0,0 +1 @@ | |||
1 + | |||
diff --git a/crates/ra_syntax/test_data/parser/fragments/expr/ok/0000_add.rast b/crates/ra_syntax/test_data/parser/fragments/expr/ok/0000_add.rast new file mode 100644 index 000000000..fa78a02a6 --- /dev/null +++ b/crates/ra_syntax/test_data/parser/fragments/expr/ok/0000_add.rast | |||
@@ -0,0 +1,8 @@ | |||
1 | [email protected] | ||
2 | [email protected] | ||
3 | [email protected] "1" | ||
4 | [email protected] " " | ||
5 | [email protected] "+" | ||
6 | [email protected] " " | ||
7 | [email protected] | ||
8 | [email protected] "2" | ||
diff --git a/crates/ra_syntax/test_data/parser/fragments/expr/ok/0000_add.rs b/crates/ra_syntax/test_data/parser/fragments/expr/ok/0000_add.rs new file mode 100644 index 000000000..e0ef58402 --- /dev/null +++ b/crates/ra_syntax/test_data/parser/fragments/expr/ok/0000_add.rs | |||
@@ -0,0 +1 @@ | |||
1 + 2 | |||
diff --git a/crates/ra_syntax/test_data/parser/fragments/item/err/0000_extra_keyword.rast b/crates/ra_syntax/test_data/parser/fragments/item/err/0000_extra_keyword.rast new file mode 100644 index 000000000..5df7507e2 --- /dev/null +++ b/crates/ra_syntax/test_data/parser/fragments/item/err/0000_extra_keyword.rast | |||
@@ -0,0 +1 @@ | |||
ERROR | |||
diff --git a/crates/ra_syntax/test_data/parser/fragments/item/err/0000_extra_keyword.rs b/crates/ra_syntax/test_data/parser/fragments/item/err/0000_extra_keyword.rs new file mode 100644 index 000000000..dc32389bb --- /dev/null +++ b/crates/ra_syntax/test_data/parser/fragments/item/err/0000_extra_keyword.rs | |||
@@ -0,0 +1 @@ | |||
fn fn foo() {} | |||
diff --git a/crates/ra_syntax/test_data/parser/fragments/item/ok/0000_fn.rast b/crates/ra_syntax/test_data/parser/fragments/item/ok/0000_fn.rast new file mode 100644 index 000000000..f1e78f388 --- /dev/null +++ b/crates/ra_syntax/test_data/parser/fragments/item/ok/0000_fn.rast | |||
@@ -0,0 +1,12 @@ | |||
1 | [email protected] | ||
2 | [email protected] "fn" | ||
3 | [email protected] " " | ||
4 | [email protected] | ||
5 | [email protected] "foo" | ||
6 | [email protected] | ||
7 | [email protected] "(" | ||
8 | [email protected] ")" | ||
9 | [email protected] " " | ||
10 | [email protected] | ||
11 | [email protected] "{" | ||
12 | [email protected] "}" | ||
diff --git a/crates/ra_syntax/test_data/parser/fragments/item/ok/0000_fn.rs b/crates/ra_syntax/test_data/parser/fragments/item/ok/0000_fn.rs new file mode 100644 index 000000000..8f3b7ef11 --- /dev/null +++ b/crates/ra_syntax/test_data/parser/fragments/item/ok/0000_fn.rs | |||
@@ -0,0 +1 @@ | |||
fn foo() {} | |||
diff --git a/crates/ra_syntax/test_data/parser/fragments/path/err/0000_reserved_word.rast b/crates/ra_syntax/test_data/parser/fragments/path/err/0000_reserved_word.rast new file mode 100644 index 000000000..5df7507e2 --- /dev/null +++ b/crates/ra_syntax/test_data/parser/fragments/path/err/0000_reserved_word.rast | |||
@@ -0,0 +1 @@ | |||
ERROR | |||
diff --git a/crates/ra_syntax/test_data/parser/fragments/path/err/0000_reserved_word.rs b/crates/ra_syntax/test_data/parser/fragments/path/err/0000_reserved_word.rs new file mode 100644 index 000000000..2046de049 --- /dev/null +++ b/crates/ra_syntax/test_data/parser/fragments/path/err/0000_reserved_word.rs | |||
@@ -0,0 +1 @@ | |||
struct | |||
diff --git a/crates/ra_syntax/test_data/parser/fragments/path/err/0001_expression.rast b/crates/ra_syntax/test_data/parser/fragments/path/err/0001_expression.rast new file mode 100644 index 000000000..5df7507e2 --- /dev/null +++ b/crates/ra_syntax/test_data/parser/fragments/path/err/0001_expression.rast | |||
@@ -0,0 +1 @@ | |||
ERROR | |||
diff --git a/crates/ra_syntax/test_data/parser/fragments/path/err/0001_expression.rs b/crates/ra_syntax/test_data/parser/fragments/path/err/0001_expression.rs new file mode 100644 index 000000000..745e8d376 --- /dev/null +++ b/crates/ra_syntax/test_data/parser/fragments/path/err/0001_expression.rs | |||
@@ -0,0 +1 @@ | |||
a + b | |||
diff --git a/crates/ra_syntax/test_data/parser/fragments/path/ok/0000_single_ident.rast b/crates/ra_syntax/test_data/parser/fragments/path/ok/0000_single_ident.rast new file mode 100644 index 000000000..0c5d4360f --- /dev/null +++ b/crates/ra_syntax/test_data/parser/fragments/path/ok/0000_single_ident.rast | |||
@@ -0,0 +1,4 @@ | |||
1 | [email protected] | ||
2 | [email protected] | ||
3 | [email protected] | ||
4 | [email protected] "foo" | ||
diff --git a/crates/ra_syntax/test_data/parser/fragments/path/ok/0000_single_ident.rs b/crates/ra_syntax/test_data/parser/fragments/path/ok/0000_single_ident.rs new file mode 100644 index 000000000..257cc5642 --- /dev/null +++ b/crates/ra_syntax/test_data/parser/fragments/path/ok/0000_single_ident.rs | |||
@@ -0,0 +1 @@ | |||
foo | |||
diff --git a/crates/ra_syntax/test_data/parser/fragments/path/ok/0001_multipart.rast b/crates/ra_syntax/test_data/parser/fragments/path/ok/0001_multipart.rast new file mode 100644 index 000000000..4a2b45e6a --- /dev/null +++ b/crates/ra_syntax/test_data/parser/fragments/path/ok/0001_multipart.rast | |||
@@ -0,0 +1,14 @@ | |||
1 | [email protected] | ||
2 | [email protected] | ||
3 | [email protected] | ||
4 | [email protected] | ||
5 | [email protected] | ||
6 | [email protected] "foo" | ||
7 | [email protected] "::" | ||
8 | [email protected] | ||
9 | [email protected] | ||
10 | [email protected] "bar" | ||
11 | [email protected] "::" | ||
12 | [email protected] | ||
13 | [email protected] | ||
14 | [email protected] "baz" | ||
diff --git a/crates/ra_syntax/test_data/parser/fragments/path/ok/0001_multipart.rs b/crates/ra_syntax/test_data/parser/fragments/path/ok/0001_multipart.rs new file mode 100644 index 000000000..81e0b21cd --- /dev/null +++ b/crates/ra_syntax/test_data/parser/fragments/path/ok/0001_multipart.rs | |||
@@ -0,0 +1 @@ | |||
foo::bar::baz | |||
diff --git a/crates/ra_syntax/test_data/parser/fragments/pattern/err/0000_reserved_word.rast b/crates/ra_syntax/test_data/parser/fragments/pattern/err/0000_reserved_word.rast new file mode 100644 index 000000000..5df7507e2 --- /dev/null +++ b/crates/ra_syntax/test_data/parser/fragments/pattern/err/0000_reserved_word.rast | |||
@@ -0,0 +1 @@ | |||
ERROR | |||
diff --git a/crates/ra_syntax/test_data/parser/fragments/pattern/err/0000_reserved_word.rs b/crates/ra_syntax/test_data/parser/fragments/pattern/err/0000_reserved_word.rs new file mode 100644 index 000000000..ae26fc455 --- /dev/null +++ b/crates/ra_syntax/test_data/parser/fragments/pattern/err/0000_reserved_word.rs | |||
@@ -0,0 +1 @@ | |||
fn | |||
diff --git a/crates/ra_syntax/test_data/parser/fragments/pattern/err/0001_missing_paren.rast b/crates/ra_syntax/test_data/parser/fragments/pattern/err/0001_missing_paren.rast new file mode 100644 index 000000000..5df7507e2 --- /dev/null +++ b/crates/ra_syntax/test_data/parser/fragments/pattern/err/0001_missing_paren.rast | |||
@@ -0,0 +1 @@ | |||
ERROR | |||
diff --git a/crates/ra_syntax/test_data/parser/fragments/pattern/err/0001_missing_paren.rs b/crates/ra_syntax/test_data/parser/fragments/pattern/err/0001_missing_paren.rs new file mode 100644 index 000000000..61a391d08 --- /dev/null +++ b/crates/ra_syntax/test_data/parser/fragments/pattern/err/0001_missing_paren.rs | |||
@@ -0,0 +1 @@ | |||
Some(x | |||
diff --git a/crates/ra_syntax/test_data/parser/fragments/pattern/ok/0000_enum.rast b/crates/ra_syntax/test_data/parser/fragments/pattern/ok/0000_enum.rast new file mode 100644 index 000000000..15eb7f9c6 --- /dev/null +++ b/crates/ra_syntax/test_data/parser/fragments/pattern/ok/0000_enum.rast | |||
@@ -0,0 +1,10 @@ | |||
1 | [email protected] | ||
2 | [email protected] | ||
3 | [email protected] | ||
4 | [email protected] | ||
5 | [email protected] "Some" | ||
6 | [email protected] "(" | ||
7 | [email protected] | ||
8 | [email protected] | ||
9 | [email protected] "x" | ||
10 | [email protected] ")" | ||
diff --git a/crates/ra_syntax/test_data/parser/fragments/pattern/ok/0000_enum.rs b/crates/ra_syntax/test_data/parser/fragments/pattern/ok/0000_enum.rs new file mode 100644 index 000000000..87114dd78 --- /dev/null +++ b/crates/ra_syntax/test_data/parser/fragments/pattern/ok/0000_enum.rs | |||
@@ -0,0 +1 @@ | |||
Some(x) | |||
diff --git a/crates/ra_syntax/test_data/parser/fragments/type/err/0000_missing_close.rast b/crates/ra_syntax/test_data/parser/fragments/type/err/0000_missing_close.rast new file mode 100644 index 000000000..5df7507e2 --- /dev/null +++ b/crates/ra_syntax/test_data/parser/fragments/type/err/0000_missing_close.rast | |||
@@ -0,0 +1 @@ | |||
ERROR | |||
diff --git a/crates/ra_syntax/test_data/parser/fragments/type/err/0000_missing_close.rs b/crates/ra_syntax/test_data/parser/fragments/type/err/0000_missing_close.rs new file mode 100644 index 000000000..caa4d7c09 --- /dev/null +++ b/crates/ra_syntax/test_data/parser/fragments/type/err/0000_missing_close.rs | |||
@@ -0,0 +1 @@ | |||
Result<Foo, Bar | |||
diff --git a/crates/ra_syntax/test_data/parser/fragments/type/ok/0000_result.rast b/crates/ra_syntax/test_data/parser/fragments/type/ok/0000_result.rast new file mode 100644 index 000000000..8831cfa6c --- /dev/null +++ b/crates/ra_syntax/test_data/parser/fragments/type/ok/0000_result.rast | |||
@@ -0,0 +1,22 @@ | |||
1 | [email protected] | ||
2 | [email protected] | ||
3 | [email protected] | ||
4 | [email protected] | ||
5 | [email protected] "Result" | ||
6 | [email protected] | ||
7 | [email protected] "<" | ||
8 | [email protected] | ||
9 | [email protected] | ||
10 | [email protected] | ||
11 | [email protected] | ||
12 | [email protected] | ||
13 | [email protected] "Foo" | ||
14 | [email protected] "," | ||
15 | [email protected] " " | ||
16 | [email protected] | ||
17 | [email protected] | ||
18 | [email protected] | ||
19 | [email protected] | ||
20 | [email protected] | ||
21 | [email protected] "Bar" | ||
22 | [email protected] ">" | ||
diff --git a/crates/ra_syntax/test_data/parser/fragments/type/ok/0000_result.rs b/crates/ra_syntax/test_data/parser/fragments/type/ok/0000_result.rs new file mode 100644 index 000000000..b50b3bb3b --- /dev/null +++ b/crates/ra_syntax/test_data/parser/fragments/type/ok/0000_result.rs | |||
@@ -0,0 +1 @@ | |||
Result<Foo, Bar> | |||
diff --git a/crates/ra_syntax/test_data/parser/inline/err/0009_attr_on_expr_not_allowed.rast b/crates/ra_syntax/test_data/parser/inline/err/0009_attr_on_expr_not_allowed.rast index 0656fdf73..4e3fa704e 100644 --- a/crates/ra_syntax/test_data/parser/inline/err/0009_attr_on_expr_not_allowed.rast +++ b/crates/ra_syntax/test_data/parser/inline/err/0009_attr_on_expr_not_allowed.rast | |||
@@ -56,4 +56,3 @@ [email protected] | |||
56 | [email protected] "}" | 56 | [email protected] "}" |
57 | [email protected] "\n" | 57 | [email protected] "\n" |
58 | error 24..24: attributes are not allowed on BIN_EXPR | 58 | error 24..24: attributes are not allowed on BIN_EXPR |
59 | error 44..44: attributes are not allowed on IF_EXPR | ||
diff --git a/crates/ra_syntax/test_data/parser/inline/err/0010_wrong_order_fns.rast b/crates/ra_syntax/test_data/parser/inline/err/0010_wrong_order_fns.rast index 9be441110..53f7ebaf9 100644 --- a/crates/ra_syntax/test_data/parser/inline/err/0010_wrong_order_fns.rast +++ b/crates/ra_syntax/test_data/parser/inline/err/0010_wrong_order_fns.rast | |||
@@ -17,23 +17,29 @@ [email protected] | |||
17 | [email protected] "{" | 17 | [email protected] "{" |
18 | [email protected] "}" | 18 | [email protected] "}" |
19 | [email protected] "\n" | 19 | [email protected] "\n" |
20 | ERROR@25..31 | 20 | CONST_DEF@25..46 |
21 | [email protected] "unsafe" | 21 | [email protected] "unsafe" |
22 | [email protected] " " | 22 | [email protected] " " |
23 | [email protected] | ||
24 | [email protected] "const" | 23 | [email protected] "const" |
25 | [email protected] " " | 24 | [email protected] " " |
26 | [email protected] "fn" | 25 | [email protected] |
26 | [email protected] "fn" | ||
27 | [email protected] " " | 27 | [email protected] " " |
28 | [email protected] | 28 | [email protected] |
29 | [email protected] "bar" | 29 | [email protected] |
30 | [email protected] | 30 | [email protected] |
31 | [email protected] "(" | 31 | [email protected] |
32 | [email protected] ")" | 32 | [email protected] "bar" |
33 | [email protected] " " | 33 | [email protected] |
34 | [email protected] | 34 | [email protected] "(" |
35 | [email protected] "{" | 35 | [email protected] ")" |
36 | [email protected] "}" | 36 | [email protected] " " |
37 | [email protected] | ||
38 | [email protected] "{" | ||
39 | [email protected] "}" | ||
37 | [email protected] "\n" | 40 | [email protected] "\n" |
38 | error 6..6: expected existential, fn, trait or impl | 41 | error 6..6: expected existential, fn, trait or impl |
39 | error 31..31: expected existential, fn, trait or impl | 42 | error 38..38: expected a name |
43 | error 40..40: expected COLON | ||
44 | error 46..46: expected SEMICOLON | ||
45 | error 47..47: expected an item | ||
diff --git a/crates/ra_syntax/test_data/parser/inline/err/0015_empty_segment.rast b/crates/ra_syntax/test_data/parser/inline/err/0015_empty_segment.rast new file mode 100644 index 000000000..da8505607 --- /dev/null +++ b/crates/ra_syntax/test_data/parser/inline/err/0015_empty_segment.rast | |||
@@ -0,0 +1,15 @@ | |||
1 | [email protected] | ||
2 | [email protected] | ||
3 | [email protected] "use" | ||
4 | [email protected] " " | ||
5 | [email protected] | ||
6 | [email protected] | ||
7 | [email protected] | ||
8 | [email protected] | ||
9 | [email protected] "crate" | ||
10 | [email protected] "::" | ||
11 | [email protected] | ||
12 | [email protected] ";" | ||
13 | [email protected] "\n" | ||
14 | error 11..11: expected identifier | ||
15 | error 12..12: expected SEMICOLON | ||
diff --git a/crates/ra_syntax/test_data/parser/inline/err/0015_empty_segment.rs b/crates/ra_syntax/test_data/parser/inline/err/0015_empty_segment.rs new file mode 100644 index 000000000..7510664e1 --- /dev/null +++ b/crates/ra_syntax/test_data/parser/inline/err/0015_empty_segment.rs | |||
@@ -0,0 +1 @@ | |||
use crate::; | |||
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0003_where_pred_for.rast b/crates/ra_syntax/test_data/parser/inline/ok/0003_where_pred_for.rast index 9dc473e43..cd0892451 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0003_where_pred_for.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0003_where_pred_for.rast | |||
@@ -1,61 +1,60 @@ | |||
1 | [email protected]9 | 1 | SOURCE_FILE@0..54 |
2 | FN_DEF@0..48 | 2 | FN_DEF@0..53 |
3 | [email protected] "fn" | 3 | [email protected] "fn" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
6 | [email protected] "test" | 6 | [email protected] "for_trait" |
7 | [email protected] | 7 | [email protected] |
8 | [email protected] "<" | 8 | [email protected] "<" |
9 | [email protected] | 9 | [email protected] |
10 | [email protected] | 10 | [email protected] |
11 | [email protected] "F" | 11 | [email protected] "F" |
12 | [email protected] ">" | 12 | [email protected] ">" |
13 | [email protected] | 13 | [email protected] |
14 | [email protected] "(" | 14 | [email protected] "(" |
15 | [email protected] ")" | 15 | [email protected] ")" |
16 | [email protected] "\n" | 16 | [email protected] "\n" |
17 | [email protected] | 17 | [email protected] |
18 | [email protected] "where" | 18 | [email protected] "where" |
19 | [email protected] "\n " | 19 | [email protected] "\n " |
20 | [email protected] | 20 | [email protected] |
21 | [email protected] | 21 | [email protected] "for" |
22 | [email protected] "for" | 22 | [email protected] |
23 | [email protected] | 23 | [email protected] "<" |
24 | [email protected] "<" | 24 | [email protected] |
25 | [email protected] | 25 | [email protected] "\'a" |
26 | [email protected] "\'a" | 26 | [email protected] ">" |
27 | [email protected] ">" | 27 | [email protected] " " |
28 | [email protected] " " | 28 | [email protected] |
29 | [email protected] | 29 | [email protected] |
30 | [email protected] | 30 | [email protected] |
31 | [email protected] | 31 | [email protected] |
32 | [email protected] | 32 | [email protected] "F" |
33 | [email protected] "F" | 33 | [email protected] ":" |
34 | [email protected] ":" | 34 | [email protected] " " |
35 | [email protected] " " | 35 | [email protected] |
36 | [email protected] | 36 | [email protected] |
37 | [email protected] | 37 | [email protected] |
38 | [email protected] | 38 | [email protected] |
39 | [email protected] | 39 | [email protected] |
40 | [email protected] | 40 | [email protected] |
41 | [email protected] | 41 | [email protected] "Fn" |
42 | [email protected] "Fn" | 42 | [email protected] |
43 | [email protected] | 43 | [email protected] "(" |
44 | [email protected] "(" | 44 | [email protected] |
45 | [email protected] | 45 | [email protected] |
46 | [email protected] | 46 | [email protected] "&" |
47 | [email protected] "&" | 47 | [email protected] "\'a" |
48 | [email protected] "\'a" | 48 | [email protected] " " |
49 | [email protected] " " | 49 | [email protected] |
50 | [email protected] | 50 | [email protected] |
51 | [email protected] | 51 | [email protected] |
52 | [email protected] | 52 | [email protected] |
53 | [email protected] | 53 | [email protected] "str" |
54 | [email protected] "str" | 54 | [email protected] ")" |
55 | [email protected] ")" | 55 | [email protected] "\n" |
56 | [email protected] "\n" | 56 | [email protected] |
57 | [email protected] | 57 | [email protected] "{" |
58 | [email protected] "{" | 58 | [email protected] " " |
59 | [email protected] " " | 59 | [email protected] "}" |
60 | [email protected] "}" | 60 | [email protected] "\n" |
61 | [email protected] "\n" | ||
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0003_where_pred_for.rs b/crates/ra_syntax/test_data/parser/inline/ok/0003_where_pred_for.rs index b448c6178..423bc105b 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0003_where_pred_for.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0003_where_pred_for.rs | |||
@@ -1,4 +1,4 @@ | |||
1 | fn test<F>() | 1 | fn for_trait<F>() |
2 | where | 2 | where |
3 | for<'a> F: Fn(&'a str) | 3 | for<'a> F: Fn(&'a str) |
4 | { } | 4 | { } |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0081_for_type.rast b/crates/ra_syntax/test_data/parser/inline/ok/0081_for_type.rast index dfb8d57ad..b26ac2d36 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0081_for_type.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0081_for_type.rast | |||
@@ -1,4 +1,4 @@ | |||
1 | [email protected]00 | 1 | SOURCE_FILE@0..121 |
2 | [email protected] | 2 | [email protected] |
3 | [email protected] "type" | 3 | [email protected] "type" |
4 | [email protected] " " | 4 | [email protected] " " |
@@ -29,212 +29,84 @@ [email protected] | |||
29 | [email protected] ")" | 29 | [email protected] ")" |
30 | [email protected] ";" | 30 | [email protected] ";" |
31 | [email protected] "\n" | 31 | [email protected] "\n" |
32 | [email protected] | 32 | [email protected] |
33 | [email protected] "fn" | 33 | [email protected] "type" |
34 | [email protected] " " | 34 | [email protected] " " |
35 | [email protected] | 35 | [email protected] |
36 | [email protected] "foo" | 36 | [email protected] "B" |
37 | [email protected] | 37 | [email protected] " " |
38 | [email protected] "<" | 38 | [email protected] "=" |
39 | [email protected] | 39 | [email protected] " " |
40 | [email protected] | 40 | [email protected] |
41 | [email protected] "T" | 41 | [email protected] "for" |
42 | [email protected] ">" | 42 | [email protected] |
43 | [email protected] | 43 | [email protected] "<" |
44 | [email protected] "(" | 44 | [email protected] |
45 | [email protected] | 45 | [email protected] "\'a" |
46 | [email protected] | 46 | [email protected] ">" |
47 | [email protected] | 47 | [email protected] " " |
48 | [email protected] "_t" | 48 | [email protected] |
49 | [email protected] ":" | 49 | [email protected] "unsafe" |
50 | [email protected] " " | 50 | [email protected] " " |
51 | [email protected] | 51 | [email protected] |
52 | [email protected] "&" | 52 | [email protected] "extern" |
53 | [email protected] | 53 | [email protected] " " |
54 | [email protected] | 54 | [email protected] "\"C\"" |
55 | [email protected] | 55 | [email protected] " " |
56 | [email protected] | 56 | [email protected] "fn" |
57 | [email protected] "T" | 57 | [email protected] |
58 | [email protected] ")" | 58 | [email protected] "(" |
59 | [email protected] " " | 59 | [email protected] |
60 | [email protected] | 60 | [email protected] |
61 | [email protected] "where" | 61 | [email protected] "&" |
62 | [email protected] " " | 62 | [email protected] "\'a" |
63 | [email protected] | 63 | [email protected] " " |
64 | [email protected] | 64 | [email protected] |
65 | [email protected] "for" | 65 | [email protected] "(" |
66 | [email protected] | 66 | [email protected] ")" |
67 | [email protected] "<" | 67 | [email protected] ")" |
68 | [email protected] | 68 | [email protected] " " |
69 | [email protected] "\'a" | 69 | [email protected] |
70 | [email protected] ">" | 70 | [email protected] "->" |
71 | [email protected] " " | 71 | [email protected] " " |
72 | [email protected] | 72 | [email protected] |
73 | [email protected] "&" | 73 | [email protected] "(" |
74 | [email protected] "\'a" | 74 | [email protected] ")" |
75 | [email protected] " " | 75 | [email protected] ";" |
76 | [email protected] | 76 | [email protected] "\n" |
77 | [email protected] | 77 | [email protected] |
78 | [email protected] | 78 | [email protected] "type" |
79 | [email protected] | 79 | [email protected] " " |
80 | [email protected] "T" | 80 | [email protected] |
81 | [email protected] ":" | 81 | [email protected] "Obj" |
82 | [email protected] " " | 82 | [email protected] " " |
83 | [email protected] | 83 | [email protected] "=" |
84 | [email protected] | 84 | [email protected] " " |
85 | [email protected] | 85 | [email protected] |
86 | [email protected] | 86 | [email protected] "for" |
87 | [email protected] | 87 | [email protected] |
88 | [email protected] | 88 | [email protected] "<" |
89 | [email protected] "Iterator" | 89 | [email protected] |
90 | [email protected] " " | 90 | [email protected] "\'a" |
91 | [email protected] | 91 | [email protected] ">" |
92 | [email protected] "{" | 92 | [email protected] " " |
93 | [email protected] "}" | 93 | [email protected] |
94 | [email protected] "\n" | 94 | [email protected] |
95 | [email protected] | 95 | [email protected] |
96 | [email protected] "fn" | 96 | [email protected] |
97 | [email protected] " " | 97 | [email protected] "PartialEq" |
98 | [email protected] | 98 | [email protected] |
99 | [email protected] "bar" | 99 | [email protected] "<" |
100 | [email protected] | 100 | [email protected] |
101 | [email protected] "<" | 101 | [email protected] |
102 | [email protected] | 102 | [email protected] "&" |
103 | [email protected] | 103 | [email protected] "\'a" |
104 | [email protected] "T" | 104 | [email protected] " " |
105 | [email protected] ">" | 105 | [email protected] |
106 | [email protected] | 106 | [email protected] |
107 | [email protected] "(" | 107 | [email protected] |
108 | [email protected] | 108 | [email protected] |
109 | [email protected] | 109 | [email protected] "i32" |
110 | [email protected] | 110 | [email protected] ">" |
111 | [email protected] "_t" | 111 | [email protected] ";" |
112 | [email protected] ":" | 112 | [email protected] "\n" |
113 | [email protected] " " | ||
114 | [email protected] | ||
115 | [email protected] "&" | ||
116 | [email protected] | ||
117 | [email protected] | ||
118 | [email protected] | ||
119 | [email protected] | ||
120 | [email protected] "T" | ||
121 | [email protected] ")" | ||
122 | [email protected] " " | ||
123 | [email protected] | ||
124 | [email protected] "where" | ||
125 | [email protected] " " | ||
126 | [email protected] | ||
127 | [email protected] | ||
128 | [email protected] "for" | ||
129 | [email protected] | ||
130 | [email protected] "<" | ||
131 | [email protected] | ||
132 | [email protected] "\'a" | ||
133 | [email protected] ">" | ||
134 | [email protected] " " | ||
135 | [email protected] | ||
136 | [email protected] "&" | ||
137 | [email protected] "\'a" | ||
138 | [email protected] " " | ||
139 | [email protected] "mut" | ||
140 | [email protected] " " | ||
141 | [email protected] | ||
142 | [email protected] | ||
143 | [email protected] | ||
144 | [email protected] | ||
145 | [email protected] "T" | ||
146 | [email protected] ":" | ||
147 | [email protected] " " | ||
148 | [email protected] | ||
149 | [email protected] | ||
150 | [email protected] | ||
151 | [email protected] | ||
152 | [email protected] | ||
153 | [email protected] | ||
154 | [email protected] "Iterator" | ||
155 | [email protected] " " | ||
156 | [email protected] | ||
157 | [email protected] "{" | ||
158 | [email protected] "}" | ||
159 | [email protected] "\n" | ||
160 | [email protected] | ||
161 | [email protected] "fn" | ||
162 | [email protected] " " | ||
163 | [email protected] | ||
164 | [email protected] "baz" | ||
165 | [email protected] | ||
166 | [email protected] "<" | ||
167 | [email protected] | ||
168 | [email protected] | ||
169 | [email protected] "T" | ||
170 | [email protected] ">" | ||
171 | [email protected] | ||
172 | [email protected] "(" | ||
173 | [email protected] | ||
174 | [email protected] | ||
175 | [email protected] | ||
176 | [email protected] "_t" | ||
177 | [email protected] ":" | ||
178 | [email protected] " " | ||
179 | [email protected] | ||
180 | [email protected] "&" | ||
181 | [email protected] | ||
182 | [email protected] | ||
183 | [email protected] | ||
184 | [email protected] | ||
185 | [email protected] "T" | ||
186 | [email protected] ")" | ||
187 | [email protected] " " | ||
188 | [email protected] | ||
189 | [email protected] "where" | ||
190 | [email protected] " " | ||
191 | [email protected] | ||
192 | [email protected] | ||
193 | [email protected] "for" | ||
194 | [email protected] | ||
195 | [email protected] "<" | ||
196 | [email protected] | ||
197 | [email protected] "\'a" | ||
198 | [email protected] ">" | ||
199 | [email protected] " " | ||
200 | [email protected] | ||
201 | [email protected] | ||
202 | [email protected] | ||
203 | [email protected] | ||
204 | [email protected] "<" | ||
205 | [email protected] | ||
206 | [email protected] "&" | ||
207 | [email protected] "\'a" | ||
208 | [email protected] " " | ||
209 | [email protected] | ||
210 | [email protected] | ||
211 | [email protected] | ||
212 | [email protected] | ||
213 | [email protected] "T" | ||
214 | [email protected] " " | ||
215 | [email protected] "as" | ||
216 | [email protected] " " | ||
217 | [email protected] | ||
218 | [email protected] | ||
219 | [email protected] | ||
220 | [email protected] | ||
221 | [email protected] "Baz" | ||
222 | [email protected] ">" | ||
223 | [email protected] "::" | ||
224 | [email protected] | ||
225 | [email protected] | ||
226 | [email protected] "Foo" | ||
227 | [email protected] ":" | ||
228 | [email protected] " " | ||
229 | [email protected] | ||
230 | [email protected] | ||
231 | [email protected] | ||
232 | [email protected] | ||
233 | [email protected] | ||
234 | [email protected] | ||
235 | [email protected] "Iterator" | ||
236 | [email protected] " " | ||
237 | [email protected] | ||
238 | [email protected] "{" | ||
239 | [email protected] "}" | ||
240 | [email protected] "\n" | ||
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0081_for_type.rs b/crates/ra_syntax/test_data/parser/inline/ok/0081_for_type.rs index d6774d438..8ac7b9e10 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0081_for_type.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0081_for_type.rs | |||
@@ -1,4 +1,3 @@ | |||
1 | type A = for<'a> fn() -> (); | 1 | type A = for<'a> fn() -> (); |
2 | fn foo<T>(_t: &T) where for<'a> &'a T: Iterator {} | 2 | type B = for<'a> unsafe extern "C" fn(&'a ()) -> (); |
3 | fn bar<T>(_t: &T) where for<'a> &'a mut T: Iterator {} | 3 | type Obj = for<'a> PartialEq<&'a i32>; |
4 | fn baz<T>(_t: &T) where for<'a> <&'a T as Baz>::Foo: Iterator {} | ||
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0163_default_unsafe_fn.rast b/crates/ra_syntax/test_data/parser/inline/ok/0163_default_unsafe_fn.rast new file mode 100644 index 000000000..adb6159f4 --- /dev/null +++ b/crates/ra_syntax/test_data/parser/inline/ok/0163_default_unsafe_fn.rast | |||
@@ -0,0 +1,40 @@ | |||
1 | [email protected] | ||
2 | [email protected] | ||
3 | [email protected] "impl" | ||
4 | [email protected] " " | ||
5 | [email protected] | ||
6 | [email protected] | ||
7 | [email protected] | ||
8 | [email protected] | ||
9 | [email protected] "T" | ||
10 | [email protected] " " | ||
11 | [email protected] "for" | ||
12 | [email protected] " " | ||
13 | [email protected] | ||
14 | [email protected] | ||
15 | [email protected] | ||
16 | [email protected] | ||
17 | [email protected] "Foo" | ||
18 | [email protected] " " | ||
19 | [email protected] | ||
20 | [email protected] "{" | ||
21 | [email protected] "\n " | ||
22 | [email protected] | ||
23 | [email protected] "default" | ||
24 | [email protected] " " | ||
25 | [email protected] "unsafe" | ||
26 | [email protected] " " | ||
27 | [email protected] "fn" | ||
28 | [email protected] " " | ||
29 | [email protected] | ||
30 | [email protected] "foo" | ||
31 | [email protected] | ||
32 | [email protected] "(" | ||
33 | [email protected] ")" | ||
34 | [email protected] " " | ||
35 | [email protected] | ||
36 | [email protected] "{" | ||
37 | [email protected] "}" | ||
38 | [email protected] "\n" | ||
39 | [email protected] "}" | ||
40 | [email protected] "\n" | ||
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0163_default_unsafe_fn.rs b/crates/ra_syntax/test_data/parser/inline/ok/0163_default_unsafe_fn.rs new file mode 100644 index 000000000..12926cd8a --- /dev/null +++ b/crates/ra_syntax/test_data/parser/inline/ok/0163_default_unsafe_fn.rs | |||
@@ -0,0 +1,3 @@ | |||
1 | impl T for Foo { | ||
2 | default unsafe fn foo() {} | ||
3 | } | ||
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0163_default_unsafe_impl.rast b/crates/ra_syntax/test_data/parser/inline/ok/0163_default_unsafe_impl.rast new file mode 100644 index 000000000..a9eda5668 --- /dev/null +++ b/crates/ra_syntax/test_data/parser/inline/ok/0163_default_unsafe_impl.rast | |||
@@ -0,0 +1,18 @@ | |||
1 | [email protected] | ||
2 | [email protected] | ||
3 | [email protected] "default" | ||
4 | [email protected] " " | ||
5 | [email protected] "unsafe" | ||
6 | [email protected] " " | ||
7 | [email protected] "impl" | ||
8 | [email protected] " " | ||
9 | [email protected] | ||
10 | [email protected] | ||
11 | [email protected] | ||
12 | [email protected] | ||
13 | [email protected] "Foo" | ||
14 | [email protected] " " | ||
15 | [email protected] | ||
16 | [email protected] "{" | ||
17 | [email protected] "}" | ||
18 | [email protected] "\n" | ||
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0163_default_unsafe_impl.rs b/crates/ra_syntax/test_data/parser/inline/ok/0163_default_unsafe_impl.rs new file mode 100644 index 000000000..ba0998ff4 --- /dev/null +++ b/crates/ra_syntax/test_data/parser/inline/ok/0163_default_unsafe_impl.rs | |||
@@ -0,0 +1 @@ | |||
default unsafe impl Foo {} | |||
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0164_type_path_in_pattern.rast b/crates/ra_syntax/test_data/parser/inline/ok/0164_type_path_in_pattern.rast new file mode 100644 index 000000000..868899275 --- /dev/null +++ b/crates/ra_syntax/test_data/parser/inline/ok/0164_type_path_in_pattern.rast | |||
@@ -0,0 +1,38 @@ | |||
1 | [email protected] | ||
2 | [email protected] | ||
3 | [email protected] "fn" | ||
4 | [email protected] " " | ||
5 | [email protected] | ||
6 | [email protected] "main" | ||
7 | [email protected] | ||
8 | [email protected] "(" | ||
9 | [email protected] ")" | ||
10 | [email protected] " " | ||
11 | [email protected] | ||
12 | [email protected] "{" | ||
13 | [email protected] " " | ||
14 | [email protected] | ||
15 | [email protected] "let" | ||
16 | [email protected] " " | ||
17 | [email protected] | ||
18 | [email protected] | ||
19 | [email protected] | ||
20 | [email protected] | ||
21 | [email protected] "<" | ||
22 | [email protected] | ||
23 | [email protected] "_" | ||
24 | [email protected] ">" | ||
25 | [email protected] "::" | ||
26 | [email protected] | ||
27 | [email protected] | ||
28 | [email protected] "Foo" | ||
29 | [email protected] " " | ||
30 | [email protected] "=" | ||
31 | [email protected] " " | ||
32 | [email protected] | ||
33 | [email protected] "(" | ||
34 | [email protected] ")" | ||
35 | [email protected] ";" | ||
36 | [email protected] " " | ||
37 | [email protected] "}" | ||
38 | [email protected] "\n" | ||
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0164_type_path_in_pattern.rs b/crates/ra_syntax/test_data/parser/inline/ok/0164_type_path_in_pattern.rs new file mode 100644 index 000000000..ebe26834d --- /dev/null +++ b/crates/ra_syntax/test_data/parser/inline/ok/0164_type_path_in_pattern.rs | |||
@@ -0,0 +1 @@ | |||
fn main() { let <_>::Foo = (); } | |||
diff --git a/crates/ra_syntax/test_data/parser/ok/0066_default_const.rast b/crates/ra_syntax/test_data/parser/ok/0066_default_const.rast new file mode 100644 index 000000000..dab0247ee --- /dev/null +++ b/crates/ra_syntax/test_data/parser/ok/0066_default_const.rast | |||
@@ -0,0 +1,44 @@ | |||
1 | [email protected] | ||
2 | [email protected] | ||
3 | [email protected] "impl" | ||
4 | [email protected] " " | ||
5 | [email protected] | ||
6 | [email protected] | ||
7 | [email protected] | ||
8 | [email protected] | ||
9 | [email protected] "T" | ||
10 | [email protected] " " | ||
11 | [email protected] "for" | ||
12 | [email protected] " " | ||
13 | [email protected] | ||
14 | [email protected] | ||
15 | [email protected] | ||
16 | [email protected] | ||
17 | [email protected] "Foo" | ||
18 | [email protected] " " | ||
19 | [email protected] | ||
20 | [email protected] "{" | ||
21 | [email protected] "\n " | ||
22 | [email protected] | ||
23 | [email protected] "default" | ||
24 | [email protected] " " | ||
25 | [email protected] "const" | ||
26 | [email protected] " " | ||
27 | [email protected] | ||
28 | [email protected] "f" | ||
29 | [email protected] ":" | ||
30 | [email protected] " " | ||
31 | [email protected] | ||
32 | [email protected] | ||
33 | [email protected] | ||
34 | [email protected] | ||
35 | [email protected] "u8" | ||
36 | [email protected] " " | ||
37 | [email protected] "=" | ||
38 | [email protected] " " | ||
39 | [email protected] | ||
40 | [email protected] "0" | ||
41 | [email protected] ";" | ||
42 | [email protected] "\n" | ||
43 | [email protected] "}" | ||
44 | [email protected] "\n" | ||
diff --git a/crates/ra_syntax/test_data/parser/ok/0066_default_const.rs b/crates/ra_syntax/test_data/parser/ok/0066_default_const.rs new file mode 100644 index 000000000..dfb3b92dc --- /dev/null +++ b/crates/ra_syntax/test_data/parser/ok/0066_default_const.rs | |||
@@ -0,0 +1,3 @@ | |||
1 | impl T for Foo { | ||
2 | default const f: u8 = 0; | ||
3 | } | ||
diff --git a/crates/ra_syntax/test_data/parser/ok/0067_where_for_pred.rast b/crates/ra_syntax/test_data/parser/ok/0067_where_for_pred.rast new file mode 100644 index 000000000..503585103 --- /dev/null +++ b/crates/ra_syntax/test_data/parser/ok/0067_where_for_pred.rast | |||
@@ -0,0 +1,392 @@ | |||
1 | [email protected] | ||
2 | [email protected] | ||
3 | [email protected] "fn" | ||
4 | [email protected] " " | ||
5 | [email protected] | ||
6 | [email protected] "for_trait" | ||
7 | [email protected] | ||
8 | [email protected] "<" | ||
9 | [email protected] | ||
10 | [email protected] | ||
11 | [email protected] "F" | ||
12 | [email protected] ">" | ||
13 | [email protected] | ||
14 | [email protected] "(" | ||
15 | [email protected] ")" | ||
16 | [email protected] "\n" | ||
17 | [email protected] | ||
18 | [email protected] "where" | ||
19 | [email protected] "\n " | ||
20 | [email protected] | ||
21 | [email protected] "for" | ||
22 | [email protected] | ||
23 | [email protected] "<" | ||
24 | [email protected] | ||
25 | [email protected] "\'a" | ||
26 | [email protected] ">" | ||
27 | [email protected] " " | ||
28 | [email protected] | ||
29 | [email protected] | ||
30 | [email protected] | ||
31 | [email protected] | ||
32 | [email protected] "F" | ||
33 | [email protected] ":" | ||
34 | [email protected] " " | ||
35 | [email protected] | ||
36 | [email protected] | ||
37 | [email protected] | ||
38 | [email protected] | ||
39 | [email protected] | ||
40 | [email protected] | ||
41 | [email protected] "Fn" | ||
42 | [email protected] | ||
43 | [email protected] "(" | ||
44 | [email protected] | ||
45 | [email protected] | ||
46 | [email protected] "&" | ||
47 | [email protected] "\'a" | ||
48 | [email protected] " " | ||
49 | [email protected] | ||
50 | [email protected] | ||
51 | [email protected] | ||
52 | [email protected] | ||
53 | [email protected] "str" | ||
54 | [email protected] ")" | ||
55 | [email protected] "," | ||
56 | [email protected] "\n" | ||
57 | [email protected] | ||
58 | [email protected] "{" | ||
59 | [email protected] "\n" | ||
60 | [email protected] "}" | ||
61 | [email protected] "\n" | ||
62 | [email protected] | ||
63 | [email protected] "fn" | ||
64 | [email protected] " " | ||
65 | [email protected] | ||
66 | [email protected] "for_ref" | ||
67 | [email protected] | ||
68 | [email protected] "<" | ||
69 | [email protected] | ||
70 | [email protected] | ||
71 | [email protected] "F" | ||
72 | [email protected] ">" | ||
73 | [email protected] | ||
74 | [email protected] "(" | ||
75 | [email protected] ")" | ||
76 | [email protected] "\n" | ||
77 | [email protected] | ||
78 | [email protected] "where" | ||
79 | [email protected] "\n " | ||
80 | [email protected] | ||
81 | [email protected] "for" | ||
82 | [email protected] | ||
83 | [email protected] "<" | ||
84 | [email protected] | ||
85 | [email protected] "\'a" | ||
86 | [email protected] ">" | ||
87 | [email protected] " " | ||
88 | [email protected] | ||
89 | [email protected] "&" | ||
90 | [email protected] "\'a" | ||
91 | [email protected] " " | ||
92 | [email protected] | ||
93 | [email protected] | ||
94 | [email protected] | ||
95 | [email protected] | ||
96 | [email protected] "F" | ||
97 | [email protected] ":" | ||
98 | [email protected] " " | ||
99 | [email protected] | ||
100 | [email protected] | ||
101 | [email protected] | ||
102 | [email protected] | ||
103 | [email protected] | ||
104 | [email protected] | ||
105 | [email protected] "Debug" | ||
106 | [email protected] "," | ||
107 | [email protected] "\n" | ||
108 | [email protected] | ||
109 | [email protected] "{" | ||
110 | [email protected] "\n" | ||
111 | [email protected] "}" | ||
112 | [email protected] "\n" | ||
113 | [email protected] | ||
114 | [email protected] "fn" | ||
115 | [email protected] " " | ||
116 | [email protected] | ||
117 | [email protected] "for_parens" | ||
118 | [email protected] | ||
119 | [email protected] "<" | ||
120 | [email protected] | ||
121 | [email protected] | ||
122 | [email protected] "F" | ||
123 | [email protected] ">" | ||
124 | [email protected] | ||
125 | [email protected] "(" | ||
126 | [email protected] ")" | ||
127 | [email protected] "\n" | ||
128 | [email protected] | ||
129 | [email protected] "where" | ||
130 | [email protected] "\n " | ||
131 | [email protected] | ||
132 | [email protected] "for" | ||
133 | [email protected] | ||
134 | [email protected] "<" | ||
135 | [email protected] | ||
136 | [email protected] "\'a" | ||
137 | [email protected] ">" | ||
138 | [email protected] " " | ||
139 | [email protected] | ||
140 | [email protected] "(" | ||
141 | [email protected] | ||
142 | [email protected] "&" | ||
143 | [email protected] "\'a" | ||
144 | [email protected] " " | ||
145 | [email protected] | ||
146 | [email protected] | ||
147 | [email protected] | ||
148 | [email protected] | ||
149 | [email protected] "F" | ||
150 | [email protected] ")" | ||
151 | [email protected] ":" | ||
152 | [email protected] " " | ||
153 | [email protected] | ||
154 | [email protected] | ||
155 | [email protected] | ||
156 | [email protected] | ||
157 | [email protected] | ||
158 | [email protected] | ||
159 | [email protected] "Fn" | ||
160 | [email protected] | ||
161 | [email protected] "(" | ||
162 | [email protected] | ||
163 | [email protected] | ||
164 | [email protected] "&" | ||
165 | [email protected] "\'a" | ||
166 | [email protected] " " | ||
167 | [email protected] | ||
168 | [email protected] | ||
169 | [email protected] | ||
170 | [email protected] | ||
171 | [email protected] "str" | ||
172 | [email protected] ")" | ||
173 | [email protected] "," | ||
174 | [email protected] "\n" | ||
175 | [email protected] | ||
176 | [email protected] "{" | ||
177 | [email protected] "\n" | ||
178 | [email protected] "}" | ||
179 | [email protected] "\n" | ||
180 | [email protected] | ||
181 | [email protected] "fn" | ||
182 | [email protected] " " | ||
183 | [email protected] | ||
184 | [email protected] "for_slice" | ||
185 | [email protected] | ||
186 | [email protected] "<" | ||
187 | [email protected] | ||
188 | [email protected] | ||
189 | [email protected] "F" | ||
190 | [email protected] ">" | ||
191 | [email protected] | ||
192 | [email protected] "(" | ||
193 | [email protected] ")" | ||
194 | [email protected] "\n" | ||
195 | [email protected] | ||
196 | [email protected] "where" | ||
197 | [email protected] "\n " | ||
198 | [email protected] | ||
199 | [email protected] "for" | ||
200 | [email protected] | ||
201 | [email protected] "<" | ||
202 | [email protected] | ||
203 | [email protected] "\'a" | ||
204 | [email protected] ">" | ||
205 | [email protected] " " | ||
206 | [email protected] | ||
207 | [email protected] "[" | ||
208 | [email protected] | ||
209 | [email protected] "&" | ||
210 | [email protected] "\'a" | ||
211 | [email protected] " " | ||
212 | [email protected] | ||
213 | [email protected] | ||
214 | [email protected] | ||
215 | [email protected] | ||
216 | [email protected] "F" | ||
217 | [email protected] "]" | ||
218 | [email protected] ":" | ||
219 | [email protected] " " | ||
220 | [email protected] | ||
221 | [email protected] | ||
222 | [email protected] | ||
223 | [email protected] | ||
224 | [email protected] | ||
225 | [email protected] | ||
226 | [email protected] "Eq" | ||
227 | [email protected] "," | ||
228 | [email protected] "\n" | ||
229 | [email protected] | ||
230 | [email protected] "{" | ||
231 | [email protected] "\n" | ||
232 | [email protected] "}" | ||
233 | [email protected] "\n" | ||
234 | [email protected] | ||
235 | [email protected] "fn" | ||
236 | [email protected] " " | ||
237 | [email protected] | ||
238 | [email protected] "for_qpath" | ||
239 | [email protected] | ||
240 | [email protected] "<" | ||
241 | [email protected] | ||
242 | [email protected] | ||
243 | [email protected] "T" | ||
244 | [email protected] ">" | ||
245 | [email protected] | ||
246 | [email protected] "(" | ||
247 | [email protected] | ||
248 | [email protected] | ||
249 | [email protected] | ||
250 | [email protected] "_t" | ||
251 | [email protected] ":" | ||
252 | [email protected] " " | ||
253 | [email protected] | ||
254 | [email protected] "&" | ||
255 | [email protected] | ||
256 | [email protected] | ||
257 | [email protected] | ||
258 | [email protected] | ||
259 | [email protected] "T" | ||
260 | [email protected] ")" | ||
261 | [email protected] "\n" | ||
262 | [email protected] | ||
263 | [email protected] "where" | ||
264 | [email protected] "\n " | ||
265 | [email protected] | ||
266 | [email protected] "for" | ||
267 | [email protected] | ||
268 | [email protected] "<" | ||
269 | [email protected] | ||
270 | [email protected] "\'a" | ||
271 | [email protected] ">" | ||
272 | [email protected] " " | ||
273 | [email protected] | ||
274 | [email protected] | ||
275 | [email protected] | ||
276 | [email protected] | ||
277 | [email protected] "<" | ||
278 | [email protected] | ||
279 | [email protected] "&" | ||
280 | [email protected] "\'a" | ||
281 | [email protected] " " | ||
282 | [email protected] | ||
283 | [email protected] | ||
284 | [email protected] | ||
285 | [email protected] | ||
286 | [email protected] "T" | ||
287 | [email protected] " " | ||
288 | [email protected] "as" | ||
289 | [email protected] " " | ||
290 | [email protected] | ||
291 | [email protected] | ||
292 | [email protected] | ||
293 | [email protected] | ||
294 | [email protected] "Baz" | ||
295 | [email protected] ">" | ||
296 | [email protected] "::" | ||
297 | [email protected] | ||
298 | [email protected] | ||
299 | [email protected] "Foo" | ||
300 | [email protected] ":" | ||
301 | [email protected] " " | ||
302 | [email protected] | ||
303 | [email protected] | ||
304 | [email protected] | ||
305 | [email protected] | ||
306 | [email protected] | ||
307 | [email protected] | ||
308 | [email protected] "Iterator" | ||
309 | [email protected] "," | ||
310 | [email protected] "\n" | ||
311 | [email protected] | ||
312 | [email protected] "{" | ||
313 | [email protected] "\n" | ||
314 | [email protected] "}" | ||
315 | [email protected] "\n" | ||
316 | [email protected] | ||
317 | [email protected] "fn" | ||
318 | [email protected] " " | ||
319 | [email protected] | ||
320 | [email protected] "for_for_fn" | ||
321 | [email protected] | ||
322 | [email protected] "<" | ||
323 | [email protected] | ||
324 | [email protected] | ||
325 | [email protected] "T" | ||
326 | [email protected] ">" | ||
327 | [email protected] | ||
328 | [email protected] "(" | ||
329 | [email protected] ")" | ||
330 | [email protected] "\n" | ||
331 | [email protected] | ||
332 | [email protected] "where" | ||
333 | [email protected] "\n " | ||
334 | [email protected] | ||
335 | [email protected] "for" | ||
336 | [email protected] | ||
337 | [email protected] "<" | ||
338 | [email protected] | ||
339 | [email protected] "\'a" | ||
340 | [email protected] ">" | ||
341 | [email protected] " " | ||
342 | [email protected] | ||
343 | [email protected] "for" | ||
344 | [email protected] | ||
345 | [email protected] "<" | ||
346 | [email protected] | ||
347 | [email protected] "\'b" | ||
348 | [email protected] ">" | ||
349 | [email protected] " " | ||
350 | [email protected] | ||
351 | [email protected] "fn" | ||
352 | [email protected] | ||
353 | [email protected] "(" | ||
354 | [email protected] | ||
355 | [email protected] | ||
356 | [email protected] "&" | ||
357 | [email protected] "\'a" | ||
358 | [email protected] " " | ||
359 | [email protected] | ||
360 | [email protected] | ||
361 | [email protected] | ||
362 | [email protected] | ||
363 | [email protected] "T" | ||
364 | [email protected] "," | ||
365 | [email protected] " " | ||
366 | [email protected] | ||
367 | [email protected] | ||
368 | [email protected] "&" | ||
369 | [email protected] "\'b" | ||
370 | [email protected] " " | ||
371 | [email protected] | ||
372 | [email protected] | ||
373 | [email protected] | ||
374 | [email protected] | ||
375 | [email protected] "T" | ||
376 | [email protected] ")" | ||
377 | [email protected] ":" | ||
378 | [email protected] " " | ||
379 | [email protected] | ||
380 | [email protected] | ||
381 | [email protected] | ||
382 | [email protected] | ||
383 | [email protected] | ||
384 | [email protected] | ||
385 | [email protected] "Copy" | ||
386 | [email protected] "," | ||
387 | [email protected] "\n" | ||
388 | [email protected] | ||
389 | [email protected] "{" | ||
390 | [email protected] "\n" | ||
391 | [email protected] "}" | ||
392 | [email protected] "\n" | ||
diff --git a/crates/ra_syntax/test_data/parser/ok/0067_where_for_pred.rs b/crates/ra_syntax/test_data/parser/ok/0067_where_for_pred.rs new file mode 100644 index 000000000..9058c4619 --- /dev/null +++ b/crates/ra_syntax/test_data/parser/ok/0067_where_for_pred.rs | |||
@@ -0,0 +1,30 @@ | |||
1 | fn for_trait<F>() | ||
2 | where | ||
3 | for<'a> F: Fn(&'a str), | ||
4 | { | ||
5 | } | ||
6 | fn for_ref<F>() | ||
7 | where | ||
8 | for<'a> &'a F: Debug, | ||
9 | { | ||
10 | } | ||
11 | fn for_parens<F>() | ||
12 | where | ||
13 | for<'a> (&'a F): Fn(&'a str), | ||
14 | { | ||
15 | } | ||
16 | fn for_slice<F>() | ||
17 | where | ||
18 | for<'a> [&'a F]: Eq, | ||
19 | { | ||
20 | } | ||
21 | fn for_qpath<T>(_t: &T) | ||
22 | where | ||
23 | for<'a> <&'a T as Baz>::Foo: Iterator, | ||
24 | { | ||
25 | } | ||
26 | fn for_for_fn<T>() | ||
27 | where | ||
28 | for<'a> for<'b> fn(&'a T, &'b T): Copy, | ||
29 | { | ||
30 | } | ||