diff options
author | Mikhail Rakhmanov <[email protected]> | 2020-06-13 07:42:15 +0100 |
---|---|---|
committer | Mikhail Rakhmanov <[email protected]> | 2020-06-13 07:42:15 +0100 |
commit | 16bbf4ab7f132e6e5e5318dccdef9a5d71afdd7f (patch) | |
tree | 4b79fa8c046be56b02427ba843e70cdf3ac05767 /crates/ra_syntax/test_data/parser/err | |
parent | eeb8b9e236796da8734ba81a49164864497f7226 (diff) | |
parent | b56ad148db0c69eb279c225f45d324b4e80e7367 (diff) |
Merge branch 'master' into keyword_completion
# Conflicts:
# docs/user/generated_features.adoc
Diffstat (limited to 'crates/ra_syntax/test_data/parser/err')
6 files changed, 336 insertions, 45 deletions
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 | } | ||