diff options
author | Ville Penttinen <[email protected]> | 2019-03-31 08:39:23 +0100 |
---|---|---|
committer | Ville Penttinen <[email protected]> | 2019-03-31 08:39:23 +0100 |
commit | 245c0d85840b3ef6e969e1a6786bdfb5285b0cea (patch) | |
tree | cba82604053656d284a4bae7a3aff80eed2b7c08 /crates/ra_syntax/tests/data | |
parent | 98cff6ecec1b0af2cb9cead544526a0dbf2760f5 (diff) |
Update tests
Diffstat (limited to 'crates/ra_syntax/tests/data')
3 files changed, 115 insertions, 67 deletions
diff --git a/crates/ra_syntax/tests/data/parser/err/0024_many_type_parens.txt b/crates/ra_syntax/tests/data/parser/err/0024_many_type_parens.txt index b353a5383..45fa70593 100644 --- a/crates/ra_syntax/tests/data/parser/err/0024_many_type_parens.txt +++ b/crates/ra_syntax/tests/data/parser/err/0024_many_type_parens.txt | |||
@@ -84,28 +84,30 @@ SOURCE_FILE@[0; 240) | |||
84 | UNDERSCORE@[75; 76) | 84 | UNDERSCORE@[75; 76) |
85 | COLON@[76; 77) | 85 | COLON@[76; 77) |
86 | WHITESPACE@[77; 78) | 86 | WHITESPACE@[77; 78) |
87 | PATH_TYPE@[78; 121) | 87 | DYN_TRAIT_TYPE@[78; 121) |
88 | PATH@[78; 88) | 88 | TYPE_BOUND_LIST@[78; 121) |
89 | PATH_SEGMENT@[78; 88) | 89 | TYPE_BOUND@[78; 88) |
90 | NAME_REF@[78; 81) | 90 | PATH_TYPE@[78; 88) |
91 | IDENT@[78; 81) "Box" | 91 | PATH@[78; 88) |
92 | TYPE_ARG_LIST@[81; 88) | 92 | PATH_SEGMENT@[78; 88) |
93 | L_ANGLE@[81; 82) | 93 | NAME_REF@[78; 81) |
94 | TYPE_ARG@[82; 88) | 94 | IDENT@[78; 81) "Box" |
95 | PAREN_TYPE@[82; 88) | 95 | TYPE_ARG_LIST@[81; 88) |
96 | L_PAREN@[82; 83) | 96 | L_ANGLE@[81; 82) |
97 | PATH_TYPE@[83; 87) | 97 | TYPE_ARG@[82; 88) |
98 | PATH@[83; 87) | 98 | PAREN_TYPE@[82; 88) |
99 | PATH_SEGMENT@[83; 87) | 99 | L_PAREN@[82; 83) |
100 | NAME_REF@[83; 87) | 100 | PATH_TYPE@[83; 87) |
101 | IDENT@[83; 87) "Copy" | 101 | PATH@[83; 87) |
102 | R_PAREN@[87; 88) | 102 | PATH_SEGMENT@[83; 87) |
103 | err: `expected COMMA` | 103 | NAME_REF@[83; 87) |
104 | err: `expected R_ANGLE` | 104 | IDENT@[83; 87) "Copy" |
105 | WHITESPACE@[88; 89) | 105 | R_PAREN@[87; 88) |
106 | PLUS@[89; 90) | 106 | err: `expected COMMA` |
107 | WHITESPACE@[90; 91) | 107 | err: `expected R_ANGLE` |
108 | TYPE_BOUND_LIST@[91; 121) | 108 | WHITESPACE@[88; 89) |
109 | PLUS@[89; 90) | ||
110 | WHITESPACE@[90; 91) | ||
109 | TYPE_BOUND@[91; 99) | 111 | TYPE_BOUND@[91; 99) |
110 | L_PAREN@[91; 92) | 112 | L_PAREN@[91; 92) |
111 | QUESTION@[92; 93) | 113 | QUESTION@[92; 93) |
@@ -254,41 +256,43 @@ SOURCE_FILE@[0; 240) | |||
254 | UNDERSCORE@[189; 190) | 256 | UNDERSCORE@[189; 190) |
255 | COLON@[190; 191) | 257 | COLON@[190; 191) |
256 | WHITESPACE@[191; 192) | 258 | WHITESPACE@[191; 192) |
257 | PATH_TYPE@[192; 235) | 259 | DYN_TRAIT_TYPE@[192; 235) |
258 | PATH@[192; 215) | 260 | TYPE_BOUND_LIST@[192; 235) |
259 | PATH_SEGMENT@[192; 215) | 261 | TYPE_BOUND@[192; 215) |
260 | NAME_REF@[192; 195) | 262 | PATH_TYPE@[192; 215) |
261 | IDENT@[192; 195) "Box" | 263 | PATH@[192; 215) |
262 | TYPE_ARG_LIST@[195; 215) | 264 | PATH_SEGMENT@[192; 215) |
263 | L_ANGLE@[195; 196) | 265 | NAME_REF@[192; 195) |
264 | TYPE_ARG@[196; 215) | 266 | IDENT@[192; 195) "Box" |
265 | PAREN_TYPE@[196; 215) | 267 | TYPE_ARG_LIST@[195; 215) |
266 | L_PAREN@[196; 197) | 268 | L_ANGLE@[195; 196) |
267 | FOR_TYPE@[197; 214) | 269 | TYPE_ARG@[196; 215) |
268 | FOR_KW@[197; 200) | 270 | PAREN_TYPE@[196; 215) |
269 | TYPE_PARAM_LIST@[200; 204) | 271 | L_PAREN@[196; 197) |
270 | L_ANGLE@[200; 201) | 272 | FOR_TYPE@[197; 214) |
271 | LIFETIME_PARAM@[201; 203) | 273 | FOR_KW@[197; 200) |
272 | LIFETIME@[201; 203) "'a" | 274 | TYPE_PARAM_LIST@[200; 204) |
273 | R_ANGLE@[203; 204) | 275 | L_ANGLE@[200; 201) |
274 | WHITESPACE@[204; 205) | 276 | LIFETIME_PARAM@[201; 203) |
275 | PATH_TYPE@[205; 214) | 277 | LIFETIME@[201; 203) "'a" |
276 | PATH@[205; 214) | 278 | R_ANGLE@[203; 204) |
277 | PATH_SEGMENT@[205; 214) | 279 | WHITESPACE@[204; 205) |
278 | NAME_REF@[205; 210) | 280 | PATH_TYPE@[205; 214) |
279 | IDENT@[205; 210) "Trait" | 281 | PATH@[205; 214) |
280 | TYPE_ARG_LIST@[210; 214) | 282 | PATH_SEGMENT@[205; 214) |
281 | L_ANGLE@[210; 211) | 283 | NAME_REF@[205; 210) |
282 | LIFETIME_ARG@[211; 213) | 284 | IDENT@[205; 210) "Trait" |
283 | LIFETIME@[211; 213) "'a" | 285 | TYPE_ARG_LIST@[210; 214) |
284 | R_ANGLE@[213; 214) | 286 | L_ANGLE@[210; 211) |
285 | R_PAREN@[214; 215) | 287 | LIFETIME_ARG@[211; 213) |
286 | err: `expected COMMA` | 288 | LIFETIME@[211; 213) "'a" |
287 | err: `expected R_ANGLE` | 289 | R_ANGLE@[213; 214) |
288 | WHITESPACE@[215; 216) | 290 | R_PAREN@[214; 215) |
289 | PLUS@[216; 217) | 291 | err: `expected COMMA` |
290 | WHITESPACE@[217; 218) | 292 | err: `expected R_ANGLE` |
291 | TYPE_BOUND_LIST@[218; 235) | 293 | WHITESPACE@[215; 216) |
294 | PLUS@[216; 217) | ||
295 | WHITESPACE@[217; 218) | ||
292 | TYPE_BOUND@[218; 224) | 296 | TYPE_BOUND@[218; 224) |
293 | L_PAREN@[218; 219) | 297 | L_PAREN@[218; 219) |
294 | PATH_TYPE@[219; 223) | 298 | PATH_TYPE@[219; 223) |
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0048_path_type_with_bounds.rs b/crates/ra_syntax/tests/data/parser/inline/ok/0048_path_type_with_bounds.rs index 215210e27..4bb0f63b7 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0048_path_type_with_bounds.rs +++ b/crates/ra_syntax/tests/data/parser/inline/ok/0048_path_type_with_bounds.rs | |||
@@ -1 +1,2 @@ | |||
1 | fn foo() -> Box<T + 'f> {} | 1 | fn foo() -> Box<T + 'f> {} |
2 | fn foo() -> Box<dyn T + 'f> {} | ||
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 a0110f555..6faf4d3b9 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 | |||
@@ -1,4 +1,4 @@ | |||
1 | SOURCE_FILE@[0; 27) | 1 | SOURCE_FILE@[0; 58) |
2 | FN_DEF@[0; 26) | 2 | FN_DEF@[0; 26) |
3 | FN_KW@[0; 2) | 3 | FN_KW@[0; 2) |
4 | WHITESPACE@[2; 3) | 4 | WHITESPACE@[2; 3) |
@@ -19,15 +19,17 @@ SOURCE_FILE@[0; 27) | |||
19 | TYPE_ARG_LIST@[15; 23) | 19 | TYPE_ARG_LIST@[15; 23) |
20 | L_ANGLE@[15; 16) | 20 | L_ANGLE@[15; 16) |
21 | TYPE_ARG@[16; 22) | 21 | TYPE_ARG@[16; 22) |
22 | PATH_TYPE@[16; 22) | 22 | DYN_TRAIT_TYPE@[16; 22) |
23 | PATH@[16; 17) | 23 | TYPE_BOUND_LIST@[16; 22) |
24 | PATH_SEGMENT@[16; 17) | 24 | TYPE_BOUND@[16; 17) |
25 | NAME_REF@[16; 17) | 25 | PATH_TYPE@[16; 17) |
26 | IDENT@[16; 17) "T" | 26 | PATH@[16; 17) |
27 | WHITESPACE@[17; 18) | 27 | PATH_SEGMENT@[16; 17) |
28 | PLUS@[18; 19) | 28 | NAME_REF@[16; 17) |
29 | WHITESPACE@[19; 20) | 29 | IDENT@[16; 17) "T" |
30 | TYPE_BOUND_LIST@[20; 22) | 30 | WHITESPACE@[17; 18) |
31 | PLUS@[18; 19) | ||
32 | WHITESPACE@[19; 20) | ||
31 | TYPE_BOUND@[20; 22) | 33 | TYPE_BOUND@[20; 22) |
32 | LIFETIME@[20; 22) "'f" | 34 | LIFETIME@[20; 22) "'f" |
33 | R_ANGLE@[22; 23) | 35 | R_ANGLE@[22; 23) |
@@ -36,3 +38,44 @@ SOURCE_FILE@[0; 27) | |||
36 | L_CURLY@[24; 25) | 38 | L_CURLY@[24; 25) |
37 | R_CURLY@[25; 26) | 39 | R_CURLY@[25; 26) |
38 | WHITESPACE@[26; 27) | 40 | WHITESPACE@[26; 27) |
41 | FN_DEF@[27; 57) | ||
42 | FN_KW@[27; 29) | ||
43 | WHITESPACE@[29; 30) | ||
44 | NAME@[30; 33) | ||
45 | IDENT@[30; 33) "foo" | ||
46 | PARAM_LIST@[33; 35) | ||
47 | L_PAREN@[33; 34) | ||
48 | R_PAREN@[34; 35) | ||
49 | WHITESPACE@[35; 36) | ||
50 | RET_TYPE@[36; 54) | ||
51 | THIN_ARROW@[36; 38) | ||
52 | WHITESPACE@[38; 39) | ||
53 | PATH_TYPE@[39; 54) | ||
54 | PATH@[39; 54) | ||
55 | PATH_SEGMENT@[39; 54) | ||
56 | NAME_REF@[39; 42) | ||
57 | IDENT@[39; 42) "Box" | ||
58 | TYPE_ARG_LIST@[42; 54) | ||
59 | L_ANGLE@[42; 43) | ||
60 | TYPE_ARG@[43; 53) | ||
61 | DYN_TRAIT_TYPE@[43; 53) | ||
62 | DYN_KW@[43; 46) | ||
63 | WHITESPACE@[46; 47) | ||
64 | TYPE_BOUND_LIST@[47; 53) | ||
65 | TYPE_BOUND@[47; 48) | ||
66 | PATH_TYPE@[47; 48) | ||
67 | PATH@[47; 48) | ||
68 | PATH_SEGMENT@[47; 48) | ||
69 | NAME_REF@[47; 48) | ||
70 | IDENT@[47; 48) "T" | ||
71 | WHITESPACE@[48; 49) | ||
72 | PLUS@[49; 50) | ||
73 | WHITESPACE@[50; 51) | ||
74 | TYPE_BOUND@[51; 53) | ||
75 | LIFETIME@[51; 53) "'f" | ||
76 | R_ANGLE@[53; 54) | ||
77 | WHITESPACE@[54; 55) | ||
78 | BLOCK@[55; 57) | ||
79 | L_CURLY@[55; 56) | ||
80 | R_CURLY@[56; 57) | ||
81 | WHITESPACE@[57; 58) | ||