diff options
author | Aleksey Kladov <[email protected]> | 2020-08-12 13:26:36 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2020-08-12 13:28:32 +0100 |
commit | f73a6419d43b21d07b7ee5d3804bdd586ee8036f (patch) | |
tree | c50a6d1bbb31debeaf9a0244f5dab4887b41c266 /crates/ra_syntax/test_data/parser/ok | |
parent | 4b3d99f98f393d1c05b1041d3178cae45ebcd3ff (diff) |
Allow default everywhere
closes #5681
Diffstat (limited to 'crates/ra_syntax/test_data/parser/ok')
4 files changed, 234 insertions, 47 deletions
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 () {} | ||