diff options
Diffstat (limited to 'crates/ra_syntax/test_data/parser/ok')
16 files changed, 506 insertions, 149 deletions
diff --git a/crates/ra_syntax/test_data/parser/ok/0021_extern_fn.rast b/crates/ra_syntax/test_data/parser/ok/0021_extern_fn.rast deleted file mode 100644 index 5524efaaf..000000000 --- a/crates/ra_syntax/test_data/parser/ok/0021_extern_fn.rast +++ /dev/null | |||
@@ -1,56 +0,0 @@ | |||
1 | [email protected] | ||
2 | [email protected] | ||
3 | [email protected] | ||
4 | [email protected] "extern" | ||
5 | [email protected] " " | ||
6 | [email protected] "fn" | ||
7 | [email protected] " " | ||
8 | [email protected] | ||
9 | [email protected] "foo" | ||
10 | [email protected] | ||
11 | [email protected] "(" | ||
12 | [email protected] ")" | ||
13 | [email protected] " " | ||
14 | [email protected] | ||
15 | [email protected] "{" | ||
16 | [email protected] "\n" | ||
17 | [email protected] "}" | ||
18 | [email protected] "\n\n" | ||
19 | [email protected] | ||
20 | [email protected] | ||
21 | [email protected] "extern" | ||
22 | [email protected] " " | ||
23 | [email protected] "\"C\"" | ||
24 | [email protected] " " | ||
25 | [email protected] "fn" | ||
26 | [email protected] " " | ||
27 | [email protected] | ||
28 | [email protected] "bar" | ||
29 | [email protected] | ||
30 | [email protected] "(" | ||
31 | [email protected] ")" | ||
32 | [email protected] " " | ||
33 | [email protected] | ||
34 | [email protected] "{" | ||
35 | [email protected] "\n" | ||
36 | [email protected] "}" | ||
37 | [email protected] "\n\n" | ||
38 | [email protected] | ||
39 | [email protected] | ||
40 | [email protected] "extern" | ||
41 | [email protected] " " | ||
42 | [email protected] "r\"D\"" | ||
43 | [email protected] " " | ||
44 | [email protected] "fn" | ||
45 | [email protected] " " | ||
46 | [email protected] | ||
47 | [email protected] "baz" | ||
48 | [email protected] | ||
49 | [email protected] "(" | ||
50 | [email protected] ")" | ||
51 | [email protected] " " | ||
52 | [email protected] | ||
53 | [email protected] "{" | ||
54 | [email protected] "\n" | ||
55 | [email protected] "}" | ||
56 | [email protected] "\n" | ||
diff --git a/crates/ra_syntax/test_data/parser/ok/0021_extern_fn.rs b/crates/ra_syntax/test_data/parser/ok/0021_extern_fn.rs deleted file mode 100644 index e929eef74..000000000 --- a/crates/ra_syntax/test_data/parser/ok/0021_extern_fn.rs +++ /dev/null | |||
@@ -1,8 +0,0 @@ | |||
1 | extern fn foo() { | ||
2 | } | ||
3 | |||
4 | extern "C" fn bar() { | ||
5 | } | ||
6 | |||
7 | extern r"D" fn baz() { | ||
8 | } | ||
diff --git a/crates/ra_syntax/test_data/parser/ok/0031_extern.rast b/crates/ra_syntax/test_data/parser/ok/0031_extern.rast index 79ea098a2..8150d445f 100644 --- a/crates/ra_syntax/test_data/parser/ok/0031_extern.rast +++ b/crates/ra_syntax/test_data/parser/ok/0031_extern.rast | |||
@@ -99,7 +99,7 @@ [email protected] | |||
99 | [email protected] "addr" | 99 | [email protected] "addr" |
100 | [email protected] ":" | 100 | [email protected] ":" |
101 | [email protected] " " | 101 | [email protected] " " |
102 | POINTE[email protected] | 102 | [email protected] |
103 | [email protected] "*" | 103 | [email protected] "*" |
104 | [email protected] "const" | 104 | [email protected] "const" |
105 | [email protected] " " | 105 | [email protected] " " |
@@ -164,7 +164,7 @@ [email protected] | |||
164 | [email protected] "address" | 164 | [email protected] "address" |
165 | [email protected] ":" | 165 | [email protected] ":" |
166 | [email protected] " " | 166 | [email protected] " " |
167 | POINTE[email protected] | 167 | [email protected] |
168 | [email protected] "*" | 168 | [email protected] "*" |
169 | [email protected] "const" | 169 | [email protected] "const" |
170 | [email protected] " " | 170 | [email protected] " " |
@@ -278,7 +278,7 @@ [email protected] | |||
278 | [email protected] "address" | 278 | [email protected] "address" |
279 | [email protected] ":" | 279 | [email protected] ":" |
280 | [email protected] " " | 280 | [email protected] " " |
281 | POINTE[email protected] | 281 | [email protected] |
282 | [email protected] "*" | 282 | [email protected] "*" |
283 | [email protected] "mut" | 283 | [email protected] "mut" |
284 | [email protected] " " | 284 | [email protected] " " |
@@ -295,7 +295,7 @@ [email protected] | |||
295 | [email protected] "address_len" | 295 | [email protected] "address_len" |
296 | [email protected] ":" | 296 | [email protected] ":" |
297 | [email protected] " " | 297 | [email protected] " " |
298 | POINTE[email protected] | 298 | [email protected] |
299 | [email protected] "*" | 299 | [email protected] "*" |
300 | [email protected] "mut" | 300 | [email protected] "mut" |
301 | [email protected] " " | 301 | [email protected] " " |
@@ -375,7 +375,7 @@ [email protected] | |||
375 | [email protected] "optval" | 375 | [email protected] "optval" |
376 | [email protected] ":" | 376 | [email protected] ":" |
377 | [email protected] " " | 377 | [email protected] " " |
378 | POINTE[email protected] | 378 | [email protected] |
379 | [email protected] "*" | 379 | [email protected] "*" |
380 | [email protected] "mut" | 380 | [email protected] "mut" |
381 | [email protected] " " | 381 | [email protected] " " |
@@ -393,7 +393,7 @@ [email protected] | |||
393 | [email protected] "optlen" | 393 | [email protected] "optlen" |
394 | [email protected] ":" | 394 | [email protected] ":" |
395 | [email protected] " " | 395 | [email protected] " " |
396 | POINTE[email protected] | 396 | [email protected] |
397 | [email protected] "*" | 397 | [email protected] "*" |
398 | [email protected] "mut" | 398 | [email protected] "mut" |
399 | [email protected] " " | 399 | [email protected] " " |
@@ -474,7 +474,7 @@ [email protected] | |||
474 | [email protected] "value" | 474 | [email protected] "value" |
475 | [email protected] ":" | 475 | [email protected] ":" |
476 | [email protected] " " | 476 | [email protected] " " |
477 | POINTE[email protected] | 477 | [email protected] |
478 | [email protected] "*" | 478 | [email protected] "*" |
479 | [email protected] "const" | 479 | [email protected] "const" |
480 | [email protected] " " | 480 | [email protected] " " |
@@ -540,7 +540,7 @@ [email protected] | |||
540 | [email protected] "address" | 540 | [email protected] "address" |
541 | [email protected] ":" | 541 | [email protected] ":" |
542 | [email protected] " " | 542 | [email protected] " " |
543 | POINTE[email protected] | 543 | [email protected] |
544 | [email protected] "*" | 544 | [email protected] "*" |
545 | [email protected] "mut" | 545 | [email protected] "mut" |
546 | [email protected] " " | 546 | [email protected] " " |
@@ -557,7 +557,7 @@ [email protected] | |||
557 | [email protected] "address_len" | 557 | [email protected] "address_len" |
558 | [email protected] ":" | 558 | [email protected] ":" |
559 | [email protected] " " | 559 | [email protected] " " |
560 | POINTE[email protected] | 560 | [email protected] |
561 | [email protected] "*" | 561 | [email protected] "*" |
562 | [email protected] "mut" | 562 | [email protected] "mut" |
563 | [email protected] " " | 563 | [email protected] " " |
@@ -609,7 +609,7 @@ [email protected] | |||
609 | [email protected] "buf" | 609 | [email protected] "buf" |
610 | [email protected] ":" | 610 | [email protected] ":" |
611 | [email protected] " " | 611 | [email protected] " " |
612 | POINTE[email protected] | 612 | [email protected] |
613 | [email protected] "*" | 613 | [email protected] "*" |
614 | [email protected] "const" | 614 | [email protected] "const" |
615 | [email protected] " " | 615 | [email protected] " " |
@@ -655,7 +655,7 @@ [email protected] | |||
655 | [email protected] "addr" | 655 | [email protected] "addr" |
656 | [email protected] ":" | 656 | [email protected] ":" |
657 | [email protected] " " | 657 | [email protected] " " |
658 | POINTE[email protected] | 658 | [email protected] |
659 | [email protected] "*" | 659 | [email protected] "*" |
660 | [email protected] "const" | 660 | [email protected] "const" |
661 | [email protected] " " | 661 | [email protected] " " |
@@ -720,7 +720,7 @@ [email protected] | |||
720 | [email protected] "buf" | 720 | [email protected] "buf" |
721 | [email protected] ":" | 721 | [email protected] ":" |
722 | [email protected] " " | 722 | [email protected] " " |
723 | POINTE[email protected] | 723 | [email protected] |
724 | [email protected] "*" | 724 | [email protected] "*" |
725 | [email protected] "const" | 725 | [email protected] "const" |
726 | [email protected] " " | 726 | [email protected] " " |
@@ -801,7 +801,7 @@ [email protected] | |||
801 | [email protected] "buf" | 801 | [email protected] "buf" |
802 | [email protected] ":" | 802 | [email protected] ":" |
803 | [email protected] " " | 803 | [email protected] " " |
804 | POINTE[email protected] | 804 | [email protected] |
805 | [email protected] "*" | 805 | [email protected] "*" |
806 | [email protected] "mut" | 806 | [email protected] "mut" |
807 | [email protected] " " | 807 | [email protected] " " |
@@ -847,7 +847,7 @@ [email protected] | |||
847 | [email protected] "addr" | 847 | [email protected] "addr" |
848 | [email protected] ":" | 848 | [email protected] ":" |
849 | [email protected] " " | 849 | [email protected] " " |
850 | POINTE[email protected] | 850 | [email protected] |
851 | [email protected] "*" | 851 | [email protected] "*" |
852 | [email protected] "mut" | 852 | [email protected] "mut" |
853 | [email protected] " " | 853 | [email protected] " " |
@@ -865,7 +865,7 @@ [email protected] | |||
865 | [email protected] "addrlen" | 865 | [email protected] "addrlen" |
866 | [email protected] ":" | 866 | [email protected] ":" |
867 | [email protected] " " | 867 | [email protected] " " |
868 | POINTE[email protected] | 868 | [email protected] |
869 | [email protected] "*" | 869 | [email protected] "*" |
870 | [email protected] "mut" | 870 | [email protected] "mut" |
871 | [email protected] " " | 871 | [email protected] " " |
@@ -918,7 +918,7 @@ [email protected] | |||
918 | [email protected] "buf" | 918 | [email protected] "buf" |
919 | [email protected] ":" | 919 | [email protected] ":" |
920 | [email protected] " " | 920 | [email protected] " " |
921 | POINTE[email protected] | 921 | [email protected] |
922 | [email protected] "*" | 922 | [email protected] "*" |
923 | [email protected] "mut" | 923 | [email protected] "mut" |
924 | [email protected] " " | 924 | [email protected] " " |
diff --git a/crates/ra_syntax/test_data/parser/ok/0035_weird_exprs.rast b/crates/ra_syntax/test_data/parser/ok/0035_weird_exprs.rast index 5bb9363a8..7c61b5006 100644 --- a/crates/ra_syntax/test_data/parser/ok/0035_weird_exprs.rast +++ b/crates/ra_syntax/test_data/parser/ok/0035_weird_exprs.rast | |||
@@ -242,7 +242,7 @@ [email protected] | |||
242 | [email protected] "x" | 242 | [email protected] "x" |
243 | [email protected] ":" | 243 | [email protected] ":" |
244 | [email protected] " " | 244 | [email protected] " " |
245 | REFERENCE[email protected] | 245 | [email protected] |
246 | [email protected] "&" | 246 | [email protected] "&" |
247 | [email protected] | 247 | [email protected] |
248 | [email protected] | 248 | [email protected] |
@@ -1579,7 +1579,7 @@ [email protected] | |||
1579 | [email protected] "union" | 1579 | [email protected] "union" |
1580 | [email protected] ":" | 1580 | [email protected] ":" |
1581 | [email protected] " " | 1581 | [email protected] " " |
1582 | REFERENCE[email protected] | 1582 | [email protected] |
1583 | [email protected] "&" | 1583 | [email protected] "&" |
1584 | [email protected] "\'union" | 1584 | [email protected] "\'union" |
1585 | [email protected] " " | 1585 | [email protected] " " |
diff --git a/crates/ra_syntax/test_data/parser/ok/0051_parameter_attrs.rast b/crates/ra_syntax/test_data/parser/ok/0051_parameter_attrs.rast index 0303b198f..d4f05f279 100644 --- a/crates/ra_syntax/test_data/parser/ok/0051_parameter_attrs.rast +++ b/crates/ra_syntax/test_data/parser/ok/0051_parameter_attrs.rast | |||
@@ -96,7 +96,7 @@ [email protected] | |||
96 | [email protected] "format" | 96 | [email protected] "format" |
97 | [email protected] ":" | 97 | [email protected] ":" |
98 | [email protected] " " | 98 | [email protected] " " |
99 | POINTE[email protected] | 99 | [email protected] |
100 | [email protected] "*" | 100 | [email protected] "*" |
101 | [email protected] "const" | 101 | [email protected] "const" |
102 | [email protected] " " | 102 | [email protected] " " |
@@ -163,7 +163,7 @@ [email protected] | |||
163 | [email protected] "]" | 163 | [email protected] "]" |
164 | [email protected] " " | 164 | [email protected] " " |
165 | [email protected] | 165 | [email protected] |
166 | REFERENCE[email protected] | 166 | [email protected] |
167 | [email protected] "&" | 167 | [email protected] "&" |
168 | [email protected] "mut" | 168 | [email protected] "mut" |
169 | [email protected] " " | 169 | [email protected] " " |
diff --git a/crates/ra_syntax/test_data/parser/ok/0054_qual_path_in_type_arg.rast b/crates/ra_syntax/test_data/parser/ok/0054_qual_path_in_type_arg.rast index f71ceecd7..f25c9ac36 100644 --- a/crates/ra_syntax/test_data/parser/ok/0054_qual_path_in_type_arg.rast +++ b/crates/ra_syntax/test_data/parser/ok/0054_qual_path_in_type_arg.rast | |||
@@ -102,7 +102,7 @@ [email protected] | |||
102 | [email protected] | 102 | [email protected] |
103 | [email protected] "(" | 103 | [email protected] "(" |
104 | [email protected] | 104 | [email protected] |
105 | REFERENCE[email protected] | 105 | [email protected] |
106 | [email protected] "&" | 106 | [email protected] "&" |
107 | [email protected] | 107 | [email protected] |
108 | [email protected] | 108 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/ok/0063_trait_fn_patterns.rast b/crates/ra_syntax/test_data/parser/ok/0063_trait_fn_patterns.rast index 42680b283..8eda59976 100644 --- a/crates/ra_syntax/test_data/parser/ok/0063_trait_fn_patterns.rast +++ b/crates/ra_syntax/test_data/parser/ok/0063_trait_fn_patterns.rast | |||
@@ -140,9 +140,9 @@ [email protected] | |||
140 | [email protected] "a" | 140 | [email protected] "a" |
141 | [email protected] ":" | 141 | [email protected] ":" |
142 | [email protected] " " | 142 | [email protected] " " |
143 | REFERENCE[email protected] | 143 | [email protected] |
144 | [email protected] "&" | 144 | [email protected] "&" |
145 | REFERENCE[email protected] | 145 | [email protected] |
146 | [email protected] "&" | 146 | [email protected] "&" |
147 | [email protected] | 147 | [email protected] |
148 | [email protected] | 148 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/ok/0063_variadic_fun.rast b/crates/ra_syntax/test_data/parser/ok/0063_variadic_fun.rast index a132591f0..4009b3ff8 100644 --- a/crates/ra_syntax/test_data/parser/ok/0063_variadic_fun.rast +++ b/crates/ra_syntax/test_data/parser/ok/0063_variadic_fun.rast | |||
@@ -20,7 +20,7 @@ [email protected] | |||
20 | [email protected] "_" | 20 | [email protected] "_" |
21 | [email protected] ":" | 21 | [email protected] ":" |
22 | [email protected] " " | 22 | [email protected] " " |
23 | POINTE[email protected] | 23 | [email protected] |
24 | [email protected] "*" | 24 | [email protected] "*" |
25 | [email protected] "mut" | 25 | [email protected] "mut" |
26 | [email protected] " " | 26 | [email protected] " " |
@@ -49,7 +49,7 @@ [email protected] | |||
49 | [email protected] "_" | 49 | [email protected] "_" |
50 | [email protected] ":" | 50 | [email protected] ":" |
51 | [email protected] " " | 51 | [email protected] " " |
52 | POINTE[email protected] | 52 | [email protected] |
53 | [email protected] "*" | 53 | [email protected] "*" |
54 | [email protected] "mut" | 54 | [email protected] "mut" |
55 | [email protected] " " | 55 | [email protected] " " |
@@ -81,7 +81,7 @@ [email protected] | |||
81 | [email protected] "_" | 81 | [email protected] "_" |
82 | [email protected] ":" | 82 | [email protected] ":" |
83 | [email protected] " " | 83 | [email protected] " " |
84 | POINTE[email protected] | 84 | [email protected] |
85 | [email protected] "*" | 85 | [email protected] "*" |
86 | [email protected] "mut" | 86 | [email protected] "mut" |
87 | [email protected] " " | 87 | [email protected] " " |
diff --git a/crates/ra_syntax/test_data/parser/ok/0064_impl_fn_params.rast b/crates/ra_syntax/test_data/parser/ok/0064_impl_fn_params.rast index 94260db7c..a3c6ed82e 100644 --- a/crates/ra_syntax/test_data/parser/ok/0064_impl_fn_params.rast +++ b/crates/ra_syntax/test_data/parser/ok/0064_impl_fn_params.rast | |||
@@ -143,9 +143,9 @@ [email protected] | |||
143 | [email protected] "a" | 143 | [email protected] "a" |
144 | [email protected] ":" | 144 | [email protected] ":" |
145 | [email protected] " " | 145 | [email protected] " " |
146 | REFERENCE[email protected] | 146 | [email protected] |
147 | [email protected] "&" | 147 | [email protected] "&" |
148 | REFERENCE[email protected] | 148 | [email protected] |
149 | [email protected] "&" | 149 | [email protected] "&" |
150 | [email protected] | 150 | [email protected] |
151 | [email protected] | 151 | [email protected] |
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 deleted file mode 100644 index 6246a31a6..000000000 --- a/crates/ra_syntax/test_data/parser/ok/0066_default_const.rast +++ /dev/null | |||
@@ -1,44 +0,0 @@ | |||
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 deleted file mode 100644 index dfb3b92dc..000000000 --- a/crates/ra_syntax/test_data/parser/ok/0066_default_const.rs +++ /dev/null | |||
@@ -1,3 +0,0 @@ | |||
1 | impl T for Foo { | ||
2 | default const f: u8 = 0; | ||
3 | } | ||
diff --git a/crates/ra_syntax/test_data/parser/ok/0066_default_modifier.rast b/crates/ra_syntax/test_data/parser/ok/0066_default_modifier.rast new file mode 100644 index 000000000..e9b57ec3b --- /dev/null +++ b/crates/ra_syntax/test_data/parser/ok/0066_default_modifier.rast | |||
@@ -0,0 +1,218 @@ | |||
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] "default" | ||
13 | [email protected] " " | ||
14 | [email protected] "type" | ||
15 | [email protected] " " | ||
16 | [email protected] | ||
17 | [email protected] "T" | ||
18 | [email protected] " " | ||
19 | [email protected] "=" | ||
20 | [email protected] " " | ||
21 | [email protected] | ||
22 | [email protected] | ||
23 | [email protected] | ||
24 | [email protected] | ||
25 | [email protected] "Bar" | ||
26 | [email protected] ";" | ||
27 | [email protected] "\n " | ||
28 | [email protected] | ||
29 | [email protected] "default" | ||
30 | [email protected] " " | ||
31 | [email protected] "const" | ||
32 | [email protected] " " | ||
33 | [email protected] | ||
34 | [email protected] "f" | ||
35 | [email protected] ":" | ||
36 | [email protected] " " | ||
37 | [email protected] | ||
38 | [email protected] | ||
39 | [email protected] | ||
40 | [email protected] | ||
41 | [email protected] "u8" | ||
42 | [email protected] " " | ||
43 | [email protected] "=" | ||
44 | [email protected] " " | ||
45 | [email protected] | ||
46 | [email protected] "0" | ||
47 | [email protected] ";" | ||
48 | [email protected] "\n " | ||
49 | [email protected] | ||
50 | [email protected] "default" | ||
51 | [email protected] " " | ||
52 | [email protected] "fn" | ||
53 | [email protected] " " | ||
54 | [email protected] | ||
55 | [email protected] "foo" | ||
56 | [email protected] | ||
57 | [email protected] "(" | ||
58 | [email protected] ")" | ||
59 | [email protected] " " | ||
60 | [email protected] | ||
61 | [email protected] "{" | ||
62 | [email protected] "}" | ||
63 | [email protected] "\n " | ||
64 | [email protected] | ||
65 | [email protected] "default" | ||
66 | [email protected] " " | ||
67 | [email protected] "unsafe" | ||
68 | [email protected] " " | ||
69 | [email protected] "fn" | ||
70 | [email protected] " " | ||
71 | [email protected] | ||
72 | [email protected] "bar" | ||
73 | [email protected] | ||
74 | [email protected] "(" | ||
75 | [email protected] ")" | ||
76 | [email protected] " " | ||
77 | [email protected] | ||
78 | [email protected] "{" | ||
79 | [email protected] "}" | ||
80 | [email protected] "\n" | ||
81 | [email protected] "}" | ||
82 | [email protected] "\n\n" | ||
83 | [email protected] | ||
84 | [email protected] "impl" | ||
85 | [email protected] " " | ||
86 | [email protected] | ||
87 | [email protected] | ||
88 | [email protected] | ||
89 | [email protected] | ||
90 | [email protected] "T" | ||
91 | [email protected] " " | ||
92 | [email protected] "for" | ||
93 | [email protected] " " | ||
94 | [email protected] | ||
95 | [email protected] | ||
96 | [email protected] | ||
97 | [email protected] | ||
98 | [email protected] "Foo" | ||
99 | [email protected] " " | ||
100 | [email protected] | ||
101 | [email protected] "{" | ||
102 | [email protected] "\n " | ||
103 | [email protected] | ||
104 | [email protected] "default" | ||
105 | [email protected] " " | ||
106 | [email protected] "type" | ||
107 | [email protected] " " | ||
108 | [email protected] | ||
109 | [email protected] "T" | ||
110 | [email protected] " " | ||
111 | [email protected] "=" | ||
112 | [email protected] " " | ||
113 | [email protected] | ||
114 | [email protected] | ||
115 | [email protected] | ||
116 | [email protected] | ||
117 | [email protected] "Bar" | ||
118 | [email protected] ";" | ||
119 | [email protected] "\n " | ||
120 | [email protected] | ||
121 | [email protected] "default" | ||
122 | [email protected] " " | ||
123 | [email protected] "const" | ||
124 | [email protected] " " | ||
125 | [email protected] | ||
126 | [email protected] "f" | ||
127 | [email protected] ":" | ||
128 | [email protected] " " | ||
129 | [email protected] | ||
130 | [email protected] | ||
131 | [email protected] | ||
132 | [email protected] | ||
133 | [email protected] "u8" | ||
134 | [email protected] " " | ||
135 | [email protected] "=" | ||
136 | [email protected] " " | ||
137 | [email protected] | ||
138 | [email protected] "0" | ||
139 | [email protected] ";" | ||
140 | [email protected] "\n " | ||
141 | [email protected] | ||
142 | [email protected] "default" | ||
143 | [email protected] " " | ||
144 | [email protected] "fn" | ||
145 | [email protected] " " | ||
146 | [email protected] | ||
147 | [email protected] "foo" | ||
148 | [email protected] | ||
149 | [email protected] "(" | ||
150 | [email protected] ")" | ||
151 | [email protected] " " | ||
152 | [email protected] | ||
153 | [email protected] "{" | ||
154 | [email protected] "}" | ||
155 | [email protected] "\n " | ||
156 | [email protected] | ||
157 | [email protected] "default" | ||
158 | [email protected] " " | ||
159 | [email protected] "unsafe" | ||
160 | [email protected] " " | ||
161 | [email protected] "fn" | ||
162 | [email protected] " " | ||
163 | [email protected] | ||
164 | [email protected] "bar" | ||
165 | [email protected] | ||
166 | [email protected] "(" | ||
167 | [email protected] ")" | ||
168 | [email protected] " " | ||
169 | [email protected] | ||
170 | [email protected] "{" | ||
171 | [email protected] "}" | ||
172 | [email protected] "\n" | ||
173 | [email protected] "}" | ||
174 | [email protected] "\n\n" | ||
175 | [email protected] | ||
176 | [email protected] "default" | ||
177 | [email protected] " " | ||
178 | [email protected] "impl" | ||
179 | [email protected] " " | ||
180 | [email protected] | ||
181 | [email protected] | ||
182 | [email protected] | ||
183 | [email protected] | ||
184 | [email protected] "T" | ||
185 | [email protected] " " | ||
186 | [email protected] "for" | ||
187 | [email protected] " " | ||
188 | [email protected] | ||
189 | [email protected] "(" | ||
190 | [email protected] ")" | ||
191 | [email protected] " " | ||
192 | [email protected] | ||
193 | [email protected] "{" | ||
194 | [email protected] "}" | ||
195 | [email protected] "\n" | ||
196 | [email protected] | ||
197 | [email protected] "default" | ||
198 | [email protected] " " | ||
199 | [email protected] "unsafe" | ||
200 | [email protected] " " | ||
201 | [email protected] "impl" | ||
202 | [email protected] " " | ||
203 | [email protected] | ||
204 | [email protected] | ||
205 | [email protected] | ||
206 | [email protected] | ||
207 | [email protected] "T" | ||
208 | [email protected] " " | ||
209 | [email protected] "for" | ||
210 | [email protected] " " | ||
211 | [email protected] | ||
212 | [email protected] "(" | ||
213 | [email protected] ")" | ||
214 | [email protected] " " | ||
215 | [email protected] | ||
216 | [email protected] "{" | ||
217 | [email protected] "}" | ||
218 | [email protected] "\n" | ||
diff --git a/crates/ra_syntax/test_data/parser/ok/0066_default_modifier.rs b/crates/ra_syntax/test_data/parser/ok/0066_default_modifier.rs new file mode 100644 index 000000000..e443e3495 --- /dev/null +++ b/crates/ra_syntax/test_data/parser/ok/0066_default_modifier.rs | |||
@@ -0,0 +1,16 @@ | |||
1 | trait T { | ||
2 | default type T = Bar; | ||
3 | default const f: u8 = 0; | ||
4 | default fn foo() {} | ||
5 | default unsafe fn bar() {} | ||
6 | } | ||
7 | |||
8 | impl T for Foo { | ||
9 | default type T = Bar; | ||
10 | default const f: u8 = 0; | ||
11 | default fn foo() {} | ||
12 | default unsafe fn bar() {} | ||
13 | } | ||
14 | |||
15 | default impl T for () {} | ||
16 | default unsafe impl T for () {} | ||
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 index fae9467fc..8f8639a37 100644 --- 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 | |||
@@ -42,7 +42,7 @@ [email protected] | |||
42 | [email protected] | 42 | [email protected] |
43 | [email protected] "(" | 43 | [email protected] "(" |
44 | [email protected] | 44 | [email protected] |
45 | REFERENCE[email protected] | 45 | [email protected] |
46 | [email protected] "&" | 46 | [email protected] "&" |
47 | [email protected] "\'a" | 47 | [email protected] "\'a" |
48 | [email protected] " " | 48 | [email protected] " " |
@@ -85,7 +85,7 @@ [email protected] | |||
85 | [email protected] "\'a" | 85 | [email protected] "\'a" |
86 | [email protected] ">" | 86 | [email protected] ">" |
87 | [email protected] " " | 87 | [email protected] " " |
88 | REFERENCE[email protected] | 88 | [email protected] |
89 | [email protected] "&" | 89 | [email protected] "&" |
90 | [email protected] "\'a" | 90 | [email protected] "\'a" |
91 | [email protected] " " | 91 | [email protected] " " |
@@ -138,7 +138,7 @@ [email protected] | |||
138 | [email protected] " " | 138 | [email protected] " " |
139 | [email protected] | 139 | [email protected] |
140 | [email protected] "(" | 140 | [email protected] "(" |
141 | REFERENCE[email protected] | 141 | [email protected] |
142 | [email protected] "&" | 142 | [email protected] "&" |
143 | [email protected] "\'a" | 143 | [email protected] "\'a" |
144 | [email protected] " " | 144 | [email protected] " " |
@@ -160,7 +160,7 @@ [email protected] | |||
160 | [email protected] | 160 | [email protected] |
161 | [email protected] "(" | 161 | [email protected] "(" |
162 | [email protected] | 162 | [email protected] |
163 | REFERENCE[email protected] | 163 | [email protected] |
164 | [email protected] "&" | 164 | [email protected] "&" |
165 | [email protected] "\'a" | 165 | [email protected] "\'a" |
166 | [email protected] " " | 166 | [email protected] " " |
@@ -205,7 +205,7 @@ [email protected] | |||
205 | [email protected] " " | 205 | [email protected] " " |
206 | [email protected] | 206 | [email protected] |
207 | [email protected] "[" | 207 | [email protected] "[" |
208 | REFERENCE[email protected] | 208 | [email protected] |
209 | [email protected] "&" | 209 | [email protected] "&" |
210 | [email protected] "\'a" | 210 | [email protected] "\'a" |
211 | [email protected] " " | 211 | [email protected] " " |
@@ -250,7 +250,7 @@ [email protected] | |||
250 | [email protected] "_t" | 250 | [email protected] "_t" |
251 | [email protected] ":" | 251 | [email protected] ":" |
252 | [email protected] " " | 252 | [email protected] " " |
253 | REFERENCE[email protected] | 253 | [email protected] |
254 | [email protected] "&" | 254 | [email protected] "&" |
255 | [email protected] | 255 | [email protected] |
256 | [email protected] | 256 | [email protected] |
@@ -275,7 +275,7 @@ [email protected] | |||
275 | [email protected] | 275 | [email protected] |
276 | [email protected] | 276 | [email protected] |
277 | [email protected] "<" | 277 | [email protected] "<" |
278 | REFERENCE[email protected] | 278 | [email protected] |
279 | [email protected] "&" | 279 | [email protected] "&" |
280 | [email protected] "\'a" | 280 | [email protected] "\'a" |
281 | [email protected] " " | 281 | [email protected] " " |
@@ -347,12 +347,12 @@ [email protected] | |||
347 | [email protected] "\'b" | 347 | [email protected] "\'b" |
348 | [email protected] ">" | 348 | [email protected] ">" |
349 | [email protected] " " | 349 | [email protected] " " |
350 | FN_POINTE[email protected] | 350 | [email protected] |
351 | [email protected] "fn" | 351 | [email protected] "fn" |
352 | [email protected] | 352 | [email protected] |
353 | [email protected] "(" | 353 | [email protected] "(" |
354 | [email protected] | 354 | [email protected] |
355 | REFERENCE[email protected] | 355 | [email protected] |
356 | [email protected] "&" | 356 | [email protected] "&" |
357 | [email protected] "\'a" | 357 | [email protected] "\'a" |
358 | [email protected] " " | 358 | [email protected] " " |
@@ -364,7 +364,7 @@ [email protected] | |||
364 | [email protected] "," | 364 | [email protected] "," |
365 | [email protected] " " | 365 | [email protected] " " |
366 | [email protected] | 366 | [email protected] |
367 | REFERENCE[email protected] | 367 | [email protected] |
368 | [email protected] "&" | 368 | [email protected] "&" |
369 | [email protected] "\'b" | 369 | [email protected] "\'b" |
370 | [email protected] " " | 370 | [email protected] " " |
diff --git a/crates/ra_syntax/test_data/parser/ok/0068_item_modifiers.rast b/crates/ra_syntax/test_data/parser/ok/0068_item_modifiers.rast new file mode 100644 index 000000000..50a6d8ee9 --- /dev/null +++ b/crates/ra_syntax/test_data/parser/ok/0068_item_modifiers.rast | |||
@@ -0,0 +1,218 @@ | |||
1 | [email protected] | ||
2 | [email protected] | ||
3 | [email protected] "async" | ||
4 | [email protected] " " | ||
5 | [email protected] "fn" | ||
6 | [email protected] " " | ||
7 | [email protected] | ||
8 | [email protected] "foo" | ||
9 | [email protected] | ||
10 | [email protected] "(" | ||
11 | [email protected] ")" | ||
12 | [email protected] " " | ||
13 | [email protected] | ||
14 | [email protected] "{" | ||
15 | [email protected] "}" | ||
16 | [email protected] "\n" | ||
17 | [email protected] | ||
18 | [email protected] | ||
19 | [email protected] "extern" | ||
20 | [email protected] " " | ||
21 | [email protected] "fn" | ||
22 | [email protected] " " | ||
23 | [email protected] | ||
24 | [email protected] "foo" | ||
25 | [email protected] | ||
26 | [email protected] "(" | ||
27 | [email protected] ")" | ||
28 | [email protected] " " | ||
29 | [email protected] | ||
30 | [email protected] "{" | ||
31 | [email protected] "}" | ||
32 | [email protected] "\n" | ||
33 | [email protected] | ||
34 | [email protected] "const" | ||
35 | [email protected] " " | ||
36 | [email protected] "fn" | ||
37 | [email protected] " " | ||
38 | [email protected] | ||
39 | [email protected] "foo" | ||
40 | [email protected] | ||
41 | [email protected] "(" | ||
42 | [email protected] ")" | ||
43 | [email protected] " " | ||
44 | [email protected] | ||
45 | [email protected] "{" | ||
46 | [email protected] "}" | ||
47 | [email protected] "\n" | ||
48 | [email protected] | ||
49 | [email protected] "const" | ||
50 | [email protected] " " | ||
51 | [email protected] "unsafe" | ||
52 | [email protected] " " | ||
53 | [email protected] "fn" | ||
54 | [email protected] " " | ||
55 | [email protected] | ||
56 | [email protected] "foo" | ||
57 | [email protected] | ||
58 | [email protected] "(" | ||
59 | [email protected] ")" | ||
60 | [email protected] " " | ||
61 | [email protected] | ||
62 | [email protected] "{" | ||
63 | [email protected] "}" | ||
64 | [email protected] "\n" | ||
65 | [email protected] | ||
66 | [email protected] "unsafe" | ||
67 | [email protected] " " | ||
68 | [email protected] | ||
69 | [email protected] "extern" | ||
70 | [email protected] " " | ||
71 | [email protected] "\"C\"" | ||
72 | [email protected] " " | ||
73 | [email protected] "fn" | ||
74 | [email protected] " " | ||
75 | [email protected] | ||
76 | [email protected] "foo" | ||
77 | [email protected] | ||
78 | [email protected] "(" | ||
79 | [email protected] ")" | ||
80 | [email protected] " " | ||
81 | [email protected] | ||
82 | [email protected] "{" | ||
83 | [email protected] "}" | ||
84 | [email protected] "\n" | ||
85 | [email protected] | ||
86 | [email protected] "unsafe" | ||
87 | [email protected] " " | ||
88 | [email protected] "fn" | ||
89 | [email protected] " " | ||
90 | [email protected] | ||
91 | [email protected] "foo" | ||
92 | [email protected] | ||
93 | [email protected] "(" | ||
94 | [email protected] ")" | ||
95 | [email protected] " " | ||
96 | [email protected] | ||
97 | [email protected] "{" | ||
98 | [email protected] "}" | ||
99 | [email protected] "\n" | ||
100 | [email protected] | ||
101 | [email protected] "async" | ||
102 | [email protected] " " | ||
103 | [email protected] "unsafe" | ||
104 | [email protected] " " | ||
105 | [email protected] "fn" | ||
106 | [email protected] " " | ||
107 | [email protected] | ||
108 | [email protected] "foo" | ||
109 | [email protected] | ||
110 | [email protected] "(" | ||
111 | [email protected] ")" | ||
112 | [email protected] " " | ||
113 | [email protected] | ||
114 | [email protected] "{" | ||
115 | [email protected] "}" | ||
116 | [email protected] "\n" | ||
117 | [email protected] | ||
118 | [email protected] "const" | ||
119 | [email protected] " " | ||
120 | [email protected] "unsafe" | ||
121 | [email protected] " " | ||
122 | [email protected] "fn" | ||
123 | [email protected] " " | ||
124 | [email protected] | ||
125 | [email protected] "bar" | ||
126 | [email protected] | ||
127 | [email protected] "(" | ||
128 | [email protected] ")" | ||
129 | [email protected] " " | ||
130 | [email protected] | ||
131 | [email protected] "{" | ||
132 | [email protected] "}" | ||
133 | [email protected] "\n\n" | ||
134 | [email protected] | ||
135 | [email protected] "unsafe" | ||
136 | [email protected] " " | ||
137 | [email protected] "trait" | ||
138 | [email protected] " " | ||
139 | [email protected] | ||
140 | [email protected] "T" | ||
141 | [email protected] " " | ||
142 | [email protected] | ||
143 | [email protected] "{" | ||
144 | [email protected] "}" | ||
145 | [email protected] "\n" | ||
146 | [email protected] | ||
147 | [email protected] "auto" | ||
148 | [email protected] " " | ||
149 | [email protected] "trait" | ||
150 | [email protected] " " | ||
151 | [email protected] | ||
152 | [email protected] "T" | ||
153 | [email protected] " " | ||
154 | [email protected] | ||
155 | [email protected] "{" | ||
156 | [email protected] "}" | ||
157 | [email protected] "\n" | ||
158 | [email protected] | ||
159 | [email protected] "unsafe" | ||
160 | [email protected] " " | ||
161 | [email protected] "auto" | ||
162 | [email protected] " " | ||
163 | [email protected] "trait" | ||
164 | [email protected] " " | ||
165 | [email protected] | ||
166 | [email protected] "T" | ||
167 | [email protected] " " | ||
168 | [email protected] | ||
169 | [email protected] "{" | ||
170 | [email protected] "}" | ||
171 | [email protected] "\n\n" | ||
172 | [email protected] | ||
173 | [email protected] "unsafe" | ||
174 | [email protected] " " | ||
175 | [email protected] "impl" | ||
176 | [email protected] " " | ||
177 | [email protected] | ||
178 | [email protected] | ||
179 | [email protected] | ||
180 | [email protected] | ||
181 | [email protected] "Foo" | ||
182 | [email protected] " " | ||
183 | [email protected] | ||
184 | [email protected] "{" | ||
185 | [email protected] "}" | ||
186 | [email protected] "\n" | ||
187 | [email protected] | ||
188 | [email protected] "default" | ||
189 | [email protected] " " | ||
190 | [email protected] "impl" | ||
191 | [email protected] " " | ||
192 | [email protected] | ||
193 | [email protected] | ||
194 | [email protected] | ||
195 | [email protected] | ||
196 | [email protected] "Foo" | ||
197 | [email protected] " " | ||
198 | [email protected] | ||
199 | [email protected] "{" | ||
200 | [email protected] "}" | ||
201 | [email protected] "\n" | ||
202 | [email protected] | ||
203 | [email protected] "unsafe" | ||
204 | [email protected] " " | ||
205 | [email protected] "default" | ||
206 | [email protected] " " | ||
207 | [email protected] "impl" | ||
208 | [email protected] " " | ||
209 | [email protected] | ||
210 | [email protected] | ||
211 | [email protected] | ||
212 | [email protected] | ||
213 | [email protected] "Foo" | ||
214 | [email protected] " " | ||
215 | [email protected] | ||
216 | [email protected] "{" | ||
217 | [email protected] "}" | ||
218 | [email protected] "\n" | ||
diff --git a/crates/ra_syntax/test_data/parser/ok/0068_item_modifiers.rs b/crates/ra_syntax/test_data/parser/ok/0068_item_modifiers.rs new file mode 100644 index 000000000..8d697c04b --- /dev/null +++ b/crates/ra_syntax/test_data/parser/ok/0068_item_modifiers.rs | |||
@@ -0,0 +1,16 @@ | |||
1 | async fn foo() {} | ||
2 | extern fn foo() {} | ||
3 | const fn foo() {} | ||
4 | const unsafe fn foo() {} | ||
5 | unsafe extern "C" fn foo() {} | ||
6 | unsafe fn foo() {} | ||
7 | async unsafe fn foo() {} | ||
8 | const unsafe fn bar() {} | ||
9 | |||
10 | unsafe trait T {} | ||
11 | auto trait T {} | ||
12 | unsafe auto trait T {} | ||
13 | |||
14 | unsafe impl Foo {} | ||
15 | default impl Foo {} | ||
16 | unsafe default impl Foo {} | ||