diff options
61 files changed, 618 insertions, 669 deletions
diff --git a/crates/ra_parser/src/grammar.rs b/crates/ra_parser/src/grammar.rs index c2e1d701e..88468bc97 100644 --- a/crates/ra_parser/src/grammar.rs +++ b/crates/ra_parser/src/grammar.rs | |||
@@ -110,7 +110,7 @@ pub(crate) mod fragments { | |||
110 | } | 110 | } |
111 | 111 | ||
112 | pub(crate) fn item(p: &mut Parser) { | 112 | pub(crate) fn item(p: &mut Parser) { |
113 | items::item_or_macro(p, true, items::ItemFlavor::Mod) | 113 | items::item_or_macro(p, true) |
114 | } | 114 | } |
115 | 115 | ||
116 | pub(crate) fn macro_items(p: &mut Parser) { | 116 | pub(crate) fn macro_items(p: &mut Parser) { |
diff --git a/crates/ra_parser/src/grammar/expressions.rs b/crates/ra_parser/src/grammar/expressions.rs index 51eaf7af6..3291e3f14 100644 --- a/crates/ra_parser/src/grammar/expressions.rs +++ b/crates/ra_parser/src/grammar/expressions.rs | |||
@@ -73,7 +73,7 @@ pub(super) fn stmt(p: &mut Parser, with_semi: StmtWithSemi) { | |||
73 | 73 | ||
74 | // test block_items | 74 | // test block_items |
75 | // fn a() { fn b() {} } | 75 | // fn a() { fn b() {} } |
76 | let m = match items::maybe_item(p, m, items::ItemFlavor::Mod) { | 76 | let m = match items::maybe_item(p, m) { |
77 | Ok(()) => return, | 77 | Ok(()) => return, |
78 | Err(m) => m, | 78 | Err(m) => m, |
79 | }; | 79 | }; |
diff --git a/crates/ra_parser/src/grammar/items.rs b/crates/ra_parser/src/grammar/items.rs index cca524cea..d091b0fbb 100644 --- a/crates/ra_parser/src/grammar/items.rs +++ b/crates/ra_parser/src/grammar/items.rs | |||
@@ -22,24 +22,19 @@ use super::*; | |||
22 | pub(super) fn mod_contents(p: &mut Parser, stop_on_r_curly: bool) { | 22 | pub(super) fn mod_contents(p: &mut Parser, stop_on_r_curly: bool) { |
23 | attributes::inner_attributes(p); | 23 | attributes::inner_attributes(p); |
24 | while !(stop_on_r_curly && p.at(T!['}']) || p.at(EOF)) { | 24 | while !(stop_on_r_curly && p.at(T!['}']) || p.at(EOF)) { |
25 | item_or_macro(p, stop_on_r_curly, ItemFlavor::Mod) | 25 | item_or_macro(p, stop_on_r_curly) |
26 | } | 26 | } |
27 | } | 27 | } |
28 | 28 | ||
29 | pub(super) enum ItemFlavor { | ||
30 | Mod, | ||
31 | Trait, | ||
32 | } | ||
33 | |||
34 | pub(super) const ITEM_RECOVERY_SET: TokenSet = token_set![ | 29 | pub(super) const ITEM_RECOVERY_SET: TokenSet = token_set![ |
35 | FN_KW, STRUCT_KW, ENUM_KW, IMPL_KW, TRAIT_KW, CONST_KW, STATIC_KW, LET_KW, MOD_KW, PUB_KW, | 30 | FN_KW, STRUCT_KW, ENUM_KW, IMPL_KW, TRAIT_KW, CONST_KW, STATIC_KW, LET_KW, MOD_KW, PUB_KW, |
36 | CRATE_KW, USE_KW, MACRO_KW | 31 | CRATE_KW, USE_KW, MACRO_KW |
37 | ]; | 32 | ]; |
38 | 33 | ||
39 | pub(super) fn item_or_macro(p: &mut Parser, stop_on_r_curly: bool, flavor: ItemFlavor) { | 34 | pub(super) fn item_or_macro(p: &mut Parser, stop_on_r_curly: bool) { |
40 | let m = p.start(); | 35 | let m = p.start(); |
41 | attributes::outer_attributes(p); | 36 | attributes::outer_attributes(p); |
42 | let m = match maybe_item(p, m, flavor) { | 37 | let m = match maybe_item(p, m) { |
43 | Ok(()) => { | 38 | Ok(()) => { |
44 | if p.at(T![;]) { | 39 | if p.at(T![;]) { |
45 | p.err_and_bump( | 40 | p.err_and_bump( |
@@ -76,7 +71,7 @@ pub(super) fn item_or_macro(p: &mut Parser, stop_on_r_curly: bool, flavor: ItemF | |||
76 | } | 71 | } |
77 | } | 72 | } |
78 | 73 | ||
79 | pub(super) fn maybe_item(p: &mut Parser, m: Marker, flavor: ItemFlavor) -> Result<(), Marker> { | 74 | pub(super) fn maybe_item(p: &mut Parser, m: Marker) -> Result<(), Marker> { |
80 | // test_err pub_expr | 75 | // test_err pub_expr |
81 | // fn foo() { pub 92; } | 76 | // fn foo() { pub 92; } |
82 | let has_visibility = opt_visibility(p); | 77 | let has_visibility = opt_visibility(p); |
@@ -114,38 +109,31 @@ pub(super) fn maybe_item(p: &mut Parser, m: Marker, flavor: ItemFlavor) -> Resul | |||
114 | has_mods = true; | 109 | has_mods = true; |
115 | } | 110 | } |
116 | 111 | ||
117 | if p.at(IDENT) | 112 | // test default_item |
118 | && p.at_contextual_kw("default") | 113 | // default impl T for Foo {} |
119 | && (match p.nth(1) { | 114 | if p.at(IDENT) && p.at_contextual_kw("default") { |
120 | T![impl] => true, | 115 | match p.nth(1) { |
116 | T![fn] | T![type] | T![const] | T![impl] => { | ||
117 | p.bump_remap(T![default]); | ||
118 | has_mods = true; | ||
119 | } | ||
121 | T![unsafe] => { | 120 | T![unsafe] => { |
122 | // test default_unsafe_impl | 121 | // test default_unsafe_item |
123 | // default unsafe impl Foo {} | 122 | // default unsafe impl T for Foo { |
124 | |||
125 | // test default_unsafe_fn | ||
126 | // impl T for Foo { | ||
127 | // default unsafe fn foo() {} | 123 | // default unsafe fn foo() {} |
128 | // } | 124 | // } |
129 | if p.nth(2) == T![impl] || p.nth(2) == T![fn] { | 125 | if matches!(p.nth(2), T![impl] | T![fn]) { |
130 | p.bump_remap(T![default]); | 126 | p.bump_remap(T![default]); |
131 | p.bump(T![unsafe]); | 127 | p.bump(T![unsafe]); |
132 | has_mods = true; | 128 | has_mods = true; |
133 | } | 129 | } |
134 | false | ||
135 | } | 130 | } |
136 | T![fn] | T![type] | T![const] => { | 131 | _ => (), |
137 | if let ItemFlavor::Mod = flavor { | 132 | } |
138 | true | ||
139 | } else { | ||
140 | false | ||
141 | } | ||
142 | } | ||
143 | _ => false, | ||
144 | }) | ||
145 | { | ||
146 | p.bump_remap(T![default]); | ||
147 | has_mods = true; | ||
148 | } | 133 | } |
134 | |||
135 | // test existential_type | ||
136 | // existential type Foo: Fn() -> usize; | ||
149 | if p.at(IDENT) && p.at_contextual_kw("existential") && p.nth(1) == T![type] { | 137 | if p.at(IDENT) && p.at_contextual_kw("existential") && p.nth(1) == T![type] { |
150 | p.bump_remap(T![existential]); | 138 | p.bump_remap(T![existential]); |
151 | has_mods = true; | 139 | has_mods = true; |
@@ -153,79 +141,31 @@ pub(super) fn maybe_item(p: &mut Parser, m: Marker, flavor: ItemFlavor) -> Resul | |||
153 | 141 | ||
154 | // items | 142 | // items |
155 | match p.current() { | 143 | match p.current() { |
156 | // test async_fn | 144 | // test fn |
157 | // async fn foo() {} | 145 | // fn foo() {} |
158 | |||
159 | // test extern_fn | ||
160 | // extern fn foo() {} | ||
161 | |||
162 | // test const_fn | ||
163 | // const fn foo() {} | ||
164 | |||
165 | // test const_unsafe_fn | ||
166 | // const unsafe fn foo() {} | ||
167 | |||
168 | // test unsafe_extern_fn | ||
169 | // unsafe extern "C" fn foo() {} | ||
170 | |||
171 | // test unsafe_fn | ||
172 | // unsafe fn foo() {} | ||
173 | |||
174 | // test combined_fns | ||
175 | // async unsafe fn foo() {} | ||
176 | // const unsafe fn bar() {} | ||
177 | |||
178 | // test_err wrong_order_fns | ||
179 | // unsafe async fn foo() {} | ||
180 | // unsafe const fn bar() {} | ||
181 | T![fn] => { | 146 | T![fn] => { |
182 | fn_def(p); | 147 | fn_def(p); |
183 | m.complete(p, FN); | 148 | m.complete(p, FN); |
184 | } | 149 | } |
185 | 150 | ||
186 | // test unsafe_trait | 151 | // test trait |
187 | // unsafe trait T {} | 152 | // trait T {} |
188 | |||
189 | // test auto_trait | ||
190 | // auto trait T {} | ||
191 | |||
192 | // test unsafe_auto_trait | ||
193 | // unsafe auto trait T {} | ||
194 | T![trait] => { | 153 | T![trait] => { |
195 | traits::trait_def(p); | 154 | traits::trait_def(p); |
196 | m.complete(p, TRAIT); | 155 | m.complete(p, TRAIT); |
197 | } | 156 | } |
198 | 157 | ||
199 | // test unsafe_impl | ||
200 | // unsafe impl Foo {} | ||
201 | |||
202 | // test default_impl | ||
203 | // default impl Foo {} | ||
204 | |||
205 | // test_err default_fn_type | ||
206 | // trait T { | ||
207 | // default type T = Bar; | ||
208 | // default fn foo() {} | ||
209 | // } | ||
210 | |||
211 | // test default_fn_type | ||
212 | // impl T for Foo { | ||
213 | // default type T = Bar; | ||
214 | // default fn foo() {} | ||
215 | // } | ||
216 | T![const] => { | 158 | T![const] => { |
217 | consts::const_def(p, m); | 159 | consts::const_def(p, m); |
218 | } | 160 | } |
219 | 161 | ||
220 | // test unsafe_default_impl | 162 | // test impl |
221 | // unsafe default impl Foo {} | 163 | // impl T for S {} |
222 | T![impl] => { | 164 | T![impl] => { |
223 | traits::impl_def(p); | 165 | traits::impl_def(p); |
224 | m.complete(p, IMPL); | 166 | m.complete(p, IMPL); |
225 | } | 167 | } |
226 | 168 | ||
227 | // test existential_type | ||
228 | // existential type Foo: Fn() -> usize; | ||
229 | T![type] => { | 169 | T![type] => { |
230 | type_def(p, m); | 170 | type_def(p, m); |
231 | } | 171 | } |
diff --git a/crates/ra_parser/src/grammar/items/traits.rs b/crates/ra_parser/src/grammar/items/traits.rs index ef9c8ff5b..751ce65f2 100644 --- a/crates/ra_parser/src/grammar/items/traits.rs +++ b/crates/ra_parser/src/grammar/items/traits.rs | |||
@@ -47,7 +47,7 @@ pub(crate) fn trait_item_list(p: &mut Parser) { | |||
47 | error_block(p, "expected an item"); | 47 | error_block(p, "expected an item"); |
48 | continue; | 48 | continue; |
49 | } | 49 | } |
50 | item_or_macro(p, true, ItemFlavor::Trait); | 50 | item_or_macro(p, true); |
51 | } | 51 | } |
52 | p.expect(T!['}']); | 52 | p.expect(T!['}']); |
53 | m.complete(p, ASSOC_ITEM_LIST); | 53 | m.complete(p, ASSOC_ITEM_LIST); |
@@ -104,7 +104,7 @@ pub(crate) fn impl_item_list(p: &mut Parser) { | |||
104 | error_block(p, "expected an item"); | 104 | error_block(p, "expected an item"); |
105 | continue; | 105 | continue; |
106 | } | 106 | } |
107 | item_or_macro(p, true, ItemFlavor::Mod); | 107 | item_or_macro(p, true); |
108 | } | 108 | } |
109 | p.expect(T!['}']); | 109 | p.expect(T!['}']); |
110 | m.complete(p, ASSOC_ITEM_LIST); | 110 | m.complete(p, ASSOC_ITEM_LIST); |
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 deleted file mode 100644 index 51ad2a846..000000000 --- a/crates/ra_syntax/test_data/parser/err/0043_default_const.rast +++ /dev/null | |||
@@ -1,40 +0,0 @@ | |||
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 deleted file mode 100644 index 80f15474a..000000000 --- a/crates/ra_syntax/test_data/parser/err/0043_default_const.rs +++ /dev/null | |||
@@ -1,3 +0,0 @@ | |||
1 | trait T { | ||
2 | default const f: u8 = 0; | ||
3 | } | ||
diff --git a/crates/ra_syntax/test_data/parser/err/0163_weird_blocks.rast b/crates/ra_syntax/test_data/parser/err/0043_weird_blocks.rast index df29017e7..df29017e7 100644 --- a/crates/ra_syntax/test_data/parser/err/0163_weird_blocks.rast +++ b/crates/ra_syntax/test_data/parser/err/0043_weird_blocks.rast | |||
diff --git a/crates/ra_syntax/test_data/parser/err/0163_weird_blocks.rs b/crates/ra_syntax/test_data/parser/err/0043_weird_blocks.rs index 8fa324c1a..8fa324c1a 100644 --- a/crates/ra_syntax/test_data/parser/err/0163_weird_blocks.rs +++ b/crates/ra_syntax/test_data/parser/err/0043_weird_blocks.rs | |||
diff --git a/crates/ra_syntax/test_data/parser/inline/err/0010_wrong_order_fns.rast b/crates/ra_syntax/test_data/parser/err/0045_item_modifiers.rast index a6e6552a9..a6e6552a9 100644 --- a/crates/ra_syntax/test_data/parser/inline/err/0010_wrong_order_fns.rast +++ b/crates/ra_syntax/test_data/parser/err/0045_item_modifiers.rast | |||
diff --git a/crates/ra_syntax/test_data/parser/inline/err/0010_wrong_order_fns.rs b/crates/ra_syntax/test_data/parser/err/0045_item_modifiers.rs index 731e58013..731e58013 100644 --- a/crates/ra_syntax/test_data/parser/inline/err/0010_wrong_order_fns.rs +++ b/crates/ra_syntax/test_data/parser/err/0045_item_modifiers.rs | |||
diff --git a/crates/ra_syntax/test_data/parser/inline/err/0014_default_fn_type.rast b/crates/ra_syntax/test_data/parser/inline/err/0014_default_fn_type.rast deleted file mode 100644 index acd72094b..000000000 --- a/crates/ra_syntax/test_data/parser/inline/err/0014_default_fn_type.rast +++ /dev/null | |||
@@ -1,58 +0,0 @@ | |||
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] "type" | ||
19 | [email protected] " " | ||
20 | [email protected] | ||
21 | [email protected] "T" | ||
22 | [email protected] " " | ||
23 | [email protected] "=" | ||
24 | [email protected] " " | ||
25 | [email protected] | ||
26 | [email protected] | ||
27 | [email protected] | ||
28 | [email protected] | ||
29 | [email protected] "Bar" | ||
30 | [email protected] ";" | ||
31 | [email protected] "\n " | ||
32 | [email protected] | ||
33 | [email protected] | ||
34 | [email protected] | ||
35 | [email protected] | ||
36 | [email protected] "default" | ||
37 | [email protected] " " | ||
38 | [email protected] | ||
39 | [email protected] "fn" | ||
40 | [email protected] " " | ||
41 | [email protected] | ||
42 | [email protected] "foo" | ||
43 | [email protected] | ||
44 | [email protected] "(" | ||
45 | [email protected] ")" | ||
46 | [email protected] " " | ||
47 | [email protected] | ||
48 | [email protected] "{" | ||
49 | [email protected] "}" | ||
50 | [email protected] "\n" | ||
51 | [email protected] "}" | ||
52 | [email protected] "\n" | ||
53 | error 21..21: expected BANG | ||
54 | error 21..21: expected `{`, `[`, `(` | ||
55 | error 21..21: expected SEMICOLON | ||
56 | error 47..47: expected BANG | ||
57 | error 47..47: expected `{`, `[`, `(` | ||
58 | error 47..47: expected SEMICOLON | ||
diff --git a/crates/ra_syntax/test_data/parser/inline/err/0014_default_fn_type.rs b/crates/ra_syntax/test_data/parser/inline/err/0014_default_fn_type.rs deleted file mode 100644 index 15ba8f4a8..000000000 --- a/crates/ra_syntax/test_data/parser/inline/err/0014_default_fn_type.rs +++ /dev/null | |||
@@ -1,4 +0,0 @@ | |||
1 | trait T { | ||
2 | default type T = Bar; | ||
3 | default fn foo() {} | ||
4 | } | ||
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0016_unsafe_trait.rast b/crates/ra_syntax/test_data/parser/inline/ok/0016_unsafe_trait.rast deleted file mode 100644 index 625ab4c2d..000000000 --- a/crates/ra_syntax/test_data/parser/inline/ok/0016_unsafe_trait.rast +++ /dev/null | |||
@@ -1,13 +0,0 @@ | |||
1 | [email protected] | ||
2 | [email protected] | ||
3 | [email protected] "unsafe" | ||
4 | [email protected] " " | ||
5 | [email protected] "trait" | ||
6 | [email protected] " " | ||
7 | [email protected] | ||
8 | [email protected] "T" | ||
9 | [email protected] " " | ||
10 | [email protected] | ||
11 | [email protected] "{" | ||
12 | [email protected] "}" | ||
13 | [email protected] "\n" | ||
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0016_unsafe_trait.rs b/crates/ra_syntax/test_data/parser/inline/ok/0016_unsafe_trait.rs deleted file mode 100644 index 04e021550..000000000 --- a/crates/ra_syntax/test_data/parser/inline/ok/0016_unsafe_trait.rs +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | unsafe trait T {} | ||
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0036_unsafe_extern_fn.rast b/crates/ra_syntax/test_data/parser/inline/ok/0036_unsafe_extern_fn.rast deleted file mode 100644 index 293b1d64c..000000000 --- a/crates/ra_syntax/test_data/parser/inline/ok/0036_unsafe_extern_fn.rast +++ /dev/null | |||
@@ -1,21 +0,0 @@ | |||
1 | [email protected] | ||
2 | [email protected] | ||
3 | [email protected] "unsafe" | ||
4 | [email protected] " " | ||
5 | [email protected] | ||
6 | [email protected] "extern" | ||
7 | [email protected] " " | ||
8 | [email protected] "\"C\"" | ||
9 | [email protected] " " | ||
10 | [email protected] "fn" | ||
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] "\n" | ||
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0036_unsafe_extern_fn.rs b/crates/ra_syntax/test_data/parser/inline/ok/0036_unsafe_extern_fn.rs deleted file mode 100644 index 1295c2cd2..000000000 --- a/crates/ra_syntax/test_data/parser/inline/ok/0036_unsafe_extern_fn.rs +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | unsafe extern "C" fn foo() {} | ||
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0047_unsafe_default_impl.rast b/crates/ra_syntax/test_data/parser/inline/ok/0047_unsafe_default_impl.rast deleted file mode 100644 index d6dfa83b7..000000000 --- a/crates/ra_syntax/test_data/parser/inline/ok/0047_unsafe_default_impl.rast +++ /dev/null | |||
@@ -1,18 +0,0 @@ | |||
1 | [email protected] | ||
2 | [email protected] | ||
3 | [email protected] "unsafe" | ||
4 | [email protected] " " | ||
5 | [email protected] "default" | ||
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/0047_unsafe_default_impl.rs b/crates/ra_syntax/test_data/parser/inline/ok/0047_unsafe_default_impl.rs deleted file mode 100644 index 9cd6c57bd..000000000 --- a/crates/ra_syntax/test_data/parser/inline/ok/0047_unsafe_default_impl.rs +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | unsafe default impl Foo {} | ||
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0057_const_fn.rast b/crates/ra_syntax/test_data/parser/inline/ok/0057_const_fn.rast deleted file mode 100644 index 97548a5ee..000000000 --- a/crates/ra_syntax/test_data/parser/inline/ok/0057_const_fn.rast +++ /dev/null | |||
@@ -1,16 +0,0 @@ | |||
1 | [email protected] | ||
2 | [email protected] | ||
3 | [email protected] "const" | ||
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" | ||
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0057_const_fn.rs b/crates/ra_syntax/test_data/parser/inline/ok/0057_const_fn.rs deleted file mode 100644 index 8c84d9cd7..000000000 --- a/crates/ra_syntax/test_data/parser/inline/ok/0057_const_fn.rs +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | const fn foo() {} | ||
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0087_unsafe_impl.rast b/crates/ra_syntax/test_data/parser/inline/ok/0087_unsafe_impl.rast deleted file mode 100644 index 43c09affe..000000000 --- a/crates/ra_syntax/test_data/parser/inline/ok/0087_unsafe_impl.rast +++ /dev/null | |||
@@ -1,16 +0,0 @@ | |||
1 | [email protected] | ||
2 | [email protected] | ||
3 | [email protected] "unsafe" | ||
4 | [email protected] " " | ||
5 | [email protected] "impl" | ||
6 | [email protected] " " | ||
7 | [email protected] | ||
8 | [email protected] | ||
9 | [email protected] | ||
10 | [email protected] | ||
11 | [email protected] "Foo" | ||
12 | [email protected] " " | ||
13 | [email protected] | ||
14 | [email protected] "{" | ||
15 | [email protected] "}" | ||
16 | [email protected] "\n" | ||
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0087_unsafe_impl.rs b/crates/ra_syntax/test_data/parser/inline/ok/0087_unsafe_impl.rs deleted file mode 100644 index 41055f41d..000000000 --- a/crates/ra_syntax/test_data/parser/inline/ok/0087_unsafe_impl.rs +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | unsafe impl Foo {} | ||
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0089_extern_fn.rast b/crates/ra_syntax/test_data/parser/inline/ok/0089_extern_fn.rast deleted file mode 100644 index 405b6a259..000000000 --- a/crates/ra_syntax/test_data/parser/inline/ok/0089_extern_fn.rast +++ /dev/null | |||
@@ -1,17 +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] "}" | ||
17 | [email protected] "\n" | ||
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0089_extern_fn.rs b/crates/ra_syntax/test_data/parser/inline/ok/0089_extern_fn.rs deleted file mode 100644 index 394a049f0..000000000 --- a/crates/ra_syntax/test_data/parser/inline/ok/0089_extern_fn.rs +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | extern fn foo() {} | ||
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0091_auto_trait.rast b/crates/ra_syntax/test_data/parser/inline/ok/0091_auto_trait.rast deleted file mode 100644 index 0cac9ac43..000000000 --- a/crates/ra_syntax/test_data/parser/inline/ok/0091_auto_trait.rast +++ /dev/null | |||
@@ -1,13 +0,0 @@ | |||
1 | [email protected] | ||
2 | [email protected] | ||
3 | [email protected] "auto" | ||
4 | [email protected] " " | ||
5 | [email protected] "trait" | ||
6 | [email protected] " " | ||
7 | [email protected] | ||
8 | [email protected] "T" | ||
9 | [email protected] " " | ||
10 | [email protected] | ||
11 | [email protected] "{" | ||
12 | [email protected] "}" | ||
13 | [email protected] "\n" | ||
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0091_auto_trait.rs b/crates/ra_syntax/test_data/parser/inline/ok/0091_auto_trait.rs deleted file mode 100644 index 72adf6035..000000000 --- a/crates/ra_syntax/test_data/parser/inline/ok/0091_auto_trait.rs +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | auto trait T {} | ||
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0094_unsafe_auto_trait.rast b/crates/ra_syntax/test_data/parser/inline/ok/0094_unsafe_auto_trait.rast deleted file mode 100644 index 0ef11c682..000000000 --- a/crates/ra_syntax/test_data/parser/inline/ok/0094_unsafe_auto_trait.rast +++ /dev/null | |||
@@ -1,15 +0,0 @@ | |||
1 | [email protected] | ||
2 | [email protected] | ||
3 | [email protected] "unsafe" | ||
4 | [email protected] " " | ||
5 | [email protected] "auto" | ||
6 | [email protected] " " | ||
7 | [email protected] "trait" | ||
8 | [email protected] " " | ||
9 | [email protected] | ||
10 | [email protected] "T" | ||
11 | [email protected] " " | ||
12 | [email protected] | ||
13 | [email protected] "{" | ||
14 | [email protected] "}" | ||
15 | [email protected] "\n" | ||
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0094_unsafe_auto_trait.rs b/crates/ra_syntax/test_data/parser/inline/ok/0094_unsafe_auto_trait.rs deleted file mode 100644 index 03d29f324..000000000 --- a/crates/ra_syntax/test_data/parser/inline/ok/0094_unsafe_auto_trait.rs +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | unsafe auto trait T {} | ||
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0097_default_impl.rast b/crates/ra_syntax/test_data/parser/inline/ok/0097_default_impl.rast deleted file mode 100644 index 0a1b21d6e..000000000 --- a/crates/ra_syntax/test_data/parser/inline/ok/0097_default_impl.rast +++ /dev/null | |||
@@ -1,16 +0,0 @@ | |||
1 | [email protected] | ||
2 | [email protected] | ||
3 | [email protected] "default" | ||
4 | [email protected] " " | ||
5 | [email protected] "impl" | ||
6 | [email protected] " " | ||
7 | [email protected] | ||
8 | [email protected] | ||
9 | [email protected] | ||
10 | [email protected] | ||
11 | [email protected] "Foo" | ||
12 | [email protected] " " | ||
13 | [email protected] | ||
14 | [email protected] "{" | ||
15 | [email protected] "}" | ||
16 | [email protected] "\n" | ||
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0097_default_impl.rs b/crates/ra_syntax/test_data/parser/inline/ok/0097_default_impl.rs deleted file mode 100644 index ef6aa84a2..000000000 --- a/crates/ra_syntax/test_data/parser/inline/ok/0097_default_impl.rs +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | default impl Foo {} | ||
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0098_const_unsafe_fn.rast b/crates/ra_syntax/test_data/parser/inline/ok/0098_const_unsafe_fn.rast deleted file mode 100644 index 32a77ba49..000000000 --- a/crates/ra_syntax/test_data/parser/inline/ok/0098_const_unsafe_fn.rast +++ /dev/null | |||
@@ -1,18 +0,0 @@ | |||
1 | [email protected] | ||
2 | [email protected] | ||
3 | [email protected] "const" | ||
4 | [email protected] " " | ||
5 | [email protected] "unsafe" | ||
6 | [email protected] " " | ||
7 | [email protected] "fn" | ||
8 | [email protected] " " | ||
9 | [email protected] | ||
10 | [email protected] "foo" | ||
11 | [email protected] | ||
12 | [email protected] "(" | ||
13 | [email protected] ")" | ||
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/0098_const_unsafe_fn.rs b/crates/ra_syntax/test_data/parser/inline/ok/0098_const_unsafe_fn.rs deleted file mode 100644 index 31a1e435f..000000000 --- a/crates/ra_syntax/test_data/parser/inline/ok/0098_const_unsafe_fn.rs +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | const unsafe fn foo() {} | ||
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0101_unsafe_fn.rast b/crates/ra_syntax/test_data/parser/inline/ok/0101_unsafe_fn.rast deleted file mode 100644 index 73c94e5d4..000000000 --- a/crates/ra_syntax/test_data/parser/inline/ok/0101_unsafe_fn.rast +++ /dev/null | |||
@@ -1,16 +0,0 @@ | |||
1 | [email protected] | ||
2 | [email protected] | ||
3 | [email protected] "unsafe" | ||
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" | ||
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0101_unsafe_fn.rs b/crates/ra_syntax/test_data/parser/inline/ok/0101_unsafe_fn.rs deleted file mode 100644 index 33cfc4cd7..000000000 --- a/crates/ra_syntax/test_data/parser/inline/ok/0101_unsafe_fn.rs +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | unsafe fn foo() {} | ||
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0124_async_fn.rast b/crates/ra_syntax/test_data/parser/inline/ok/0124_async_fn.rast deleted file mode 100644 index a7df188bd..000000000 --- a/crates/ra_syntax/test_data/parser/inline/ok/0124_async_fn.rast +++ /dev/null | |||
@@ -1,16 +0,0 @@ | |||
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" | ||
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0124_async_fn.rs b/crates/ra_syntax/test_data/parser/inline/ok/0124_async_fn.rs deleted file mode 100644 index f4adcb62b..000000000 --- a/crates/ra_syntax/test_data/parser/inline/ok/0124_async_fn.rs +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | async fn foo() {} | ||
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0128_combined_fns.rast b/crates/ra_syntax/test_data/parser/inline/ok/0128_combined_fns.rast deleted file mode 100644 index 98a20f36d..000000000 --- a/crates/ra_syntax/test_data/parser/inline/ok/0128_combined_fns.rast +++ /dev/null | |||
@@ -1,35 +0,0 @@ | |||
1 | [email protected] | ||
2 | [email protected] | ||
3 | [email protected] "async" | ||
4 | [email protected] " " | ||
5 | [email protected] "unsafe" | ||
6 | [email protected] " " | ||
7 | [email protected] "fn" | ||
8 | [email protected] " " | ||
9 | [email protected] | ||
10 | [email protected] "foo" | ||
11 | [email protected] | ||
12 | [email protected] "(" | ||
13 | [email protected] ")" | ||
14 | [email protected] " " | ||
15 | [email protected] | ||
16 | [email protected] "{" | ||
17 | [email protected] "}" | ||
18 | [email protected] "\n" | ||
19 | [email protected] | ||
20 | [email protected] "const" | ||
21 | [email protected] " " | ||
22 | [email protected] "unsafe" | ||
23 | [email protected] " " | ||
24 | [email protected] "fn" | ||
25 | [email protected] " " | ||
26 | [email protected] | ||
27 | [email protected] "bar" | ||
28 | [email protected] | ||
29 | [email protected] "(" | ||
30 | [email protected] ")" | ||
31 | [email protected] " " | ||
32 | [email protected] | ||
33 | [email protected] "{" | ||
34 | [email protected] "}" | ||
35 | [email protected] "\n" | ||
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0128_combined_fns.rs b/crates/ra_syntax/test_data/parser/inline/ok/0128_combined_fns.rs deleted file mode 100644 index 126287145..000000000 --- a/crates/ra_syntax/test_data/parser/inline/ok/0128_combined_fns.rs +++ /dev/null | |||
@@ -1,2 +0,0 @@ | |||
1 | async unsafe fn foo() {} | ||
2 | const unsafe fn bar() {} | ||
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0132_default_fn_type.rast b/crates/ra_syntax/test_data/parser/inline/ok/0132_default_fn_type.rast deleted file mode 100644 index b8d26a53a..000000000 --- a/crates/ra_syntax/test_data/parser/inline/ok/0132_default_fn_type.rast +++ /dev/null | |||
@@ -1,55 +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] "type" | ||
26 | [email protected] " " | ||
27 | [email protected] | ||
28 | [email protected] "T" | ||
29 | [email protected] " " | ||
30 | [email protected] "=" | ||
31 | [email protected] " " | ||
32 | [email protected] | ||
33 | [email protected] | ||
34 | [email protected] | ||
35 | [email protected] | ||
36 | [email protected] "Bar" | ||
37 | [email protected] ";" | ||
38 | [email protected] "\n " | ||
39 | [email protected] | ||
40 | [email protected] "default" | ||
41 | [email protected] " " | ||
42 | [email protected] "fn" | ||
43 | [email protected] " " | ||
44 | [email protected] | ||
45 | [email protected] "foo" | ||
46 | [email protected] | ||
47 | [email protected] "(" | ||
48 | [email protected] ")" | ||
49 | [email protected] " " | ||
50 | [email protected] | ||
51 | [email protected] "{" | ||
52 | [email protected] "}" | ||
53 | [email protected] "\n" | ||
54 | [email protected] "}" | ||
55 | [email protected] "\n" | ||
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0132_default_fn_type.rs b/crates/ra_syntax/test_data/parser/inline/ok/0132_default_fn_type.rs deleted file mode 100644 index 8f5d61113..000000000 --- a/crates/ra_syntax/test_data/parser/inline/ok/0132_default_fn_type.rs +++ /dev/null | |||
@@ -1,4 +0,0 @@ | |||
1 | impl T for Foo { | ||
2 | default type T = Bar; | ||
3 | default fn foo() {} | ||
4 | } | ||
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0151_fn.rast b/crates/ra_syntax/test_data/parser/inline/ok/0151_fn.rast new file mode 100644 index 000000000..23c4269b3 --- /dev/null +++ b/crates/ra_syntax/test_data/parser/inline/ok/0151_fn.rast | |||
@@ -0,0 +1,14 @@ | |||
1 | [email protected] | ||
2 | [email protected] | ||
3 | [email protected] "fn" | ||
4 | [email protected] " " | ||
5 | [email protected] | ||
6 | [email protected] "foo" | ||
7 | [email protected] | ||
8 | [email protected] "(" | ||
9 | [email protected] ")" | ||
10 | [email protected] " " | ||
11 | [email protected] | ||
12 | [email protected] "{" | ||
13 | [email protected] "}" | ||
14 | [email protected] "\n" | ||
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0151_fn.rs b/crates/ra_syntax/test_data/parser/inline/ok/0151_fn.rs new file mode 100644 index 000000000..8f3b7ef11 --- /dev/null +++ b/crates/ra_syntax/test_data/parser/inline/ok/0151_fn.rs | |||
@@ -0,0 +1 @@ | |||
fn foo() {} | |||
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0152_impl.rast b/crates/ra_syntax/test_data/parser/inline/ok/0152_impl.rast new file mode 100644 index 000000000..7968cf9ff --- /dev/null +++ b/crates/ra_syntax/test_data/parser/inline/ok/0152_impl.rast | |||
@@ -0,0 +1,22 @@ | |||
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] "S" | ||
18 | [email protected] " " | ||
19 | [email protected] | ||
20 | [email protected] "{" | ||
21 | [email protected] "}" | ||
22 | [email protected] "\n" | ||
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0152_impl.rs b/crates/ra_syntax/test_data/parser/inline/ok/0152_impl.rs new file mode 100644 index 000000000..a1a550d8a --- /dev/null +++ b/crates/ra_syntax/test_data/parser/inline/ok/0152_impl.rs | |||
@@ -0,0 +1 @@ | |||
impl T for S {} | |||
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0153_trait.rast b/crates/ra_syntax/test_data/parser/inline/ok/0153_trait.rast new file mode 100644 index 000000000..9881e5048 --- /dev/null +++ b/crates/ra_syntax/test_data/parser/inline/ok/0153_trait.rast | |||
@@ -0,0 +1,11 @@ | |||
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] "}" | ||
11 | [email protected] "\n" | ||
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0153_trait.rs b/crates/ra_syntax/test_data/parser/inline/ok/0153_trait.rs new file mode 100644 index 000000000..8d183dbb5 --- /dev/null +++ b/crates/ra_syntax/test_data/parser/inline/ok/0153_trait.rs | |||
@@ -0,0 +1 @@ | |||
trait T {} | |||
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 deleted file mode 100644 index 1269621dc..000000000 --- a/crates/ra_syntax/test_data/parser/inline/ok/0163_default_unsafe_fn.rast +++ /dev/null | |||
@@ -1,40 +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] "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_impl.rast b/crates/ra_syntax/test_data/parser/inline/ok/0163_default_unsafe_impl.rast deleted file mode 100644 index 6bfe925af..000000000 --- a/crates/ra_syntax/test_data/parser/inline/ok/0163_default_unsafe_impl.rast +++ /dev/null | |||
@@ -1,18 +0,0 @@ | |||
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 deleted file mode 100644 index ba0998ff4..000000000 --- a/crates/ra_syntax/test_data/parser/inline/ok/0163_default_unsafe_impl.rs +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | default unsafe impl Foo {} | ||
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0163_default_unsafe_item.rast b/crates/ra_syntax/test_data/parser/inline/ok/0163_default_unsafe_item.rast new file mode 100644 index 000000000..f2e201460 --- /dev/null +++ b/crates/ra_syntax/test_data/parser/inline/ok/0163_default_unsafe_item.rast | |||
@@ -0,0 +1,44 @@ | |||
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] "T" | ||
14 | [email protected] " " | ||
15 | [email protected] "for" | ||
16 | [email protected] " " | ||
17 | [email protected] | ||
18 | [email protected] | ||
19 | [email protected] | ||
20 | [email protected] | ||
21 | [email protected] "Foo" | ||
22 | [email protected] " " | ||
23 | [email protected] | ||
24 | [email protected] "{" | ||
25 | [email protected] "\n " | ||
26 | [email protected] | ||
27 | [email protected] "default" | ||
28 | [email protected] " " | ||
29 | [email protected] "unsafe" | ||
30 | [email protected] " " | ||
31 | [email protected] "fn" | ||
32 | [email protected] " " | ||
33 | [email protected] | ||
34 | [email protected] "foo" | ||
35 | [email protected] | ||
36 | [email protected] "(" | ||
37 | [email protected] ")" | ||
38 | [email protected] " " | ||
39 | [email protected] | ||
40 | [email protected] "{" | ||
41 | [email protected] "}" | ||
42 | [email protected] "\n" | ||
43 | [email protected] "}" | ||
44 | [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_item.rs index 12926cd8a..96340f84a 100644 --- 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_item.rs | |||
@@ -1,3 +1,3 @@ | |||
1 | impl T for Foo { | 1 | default unsafe impl T for Foo { |
2 | default unsafe fn foo() {} | 2 | default unsafe fn foo() {} |
3 | } | 3 | } |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0164_default_item.rast b/crates/ra_syntax/test_data/parser/inline/ok/0164_default_item.rast new file mode 100644 index 000000000..9282772f3 --- /dev/null +++ b/crates/ra_syntax/test_data/parser/inline/ok/0164_default_item.rast | |||
@@ -0,0 +1,24 @@ | |||
1 | [email protected] | ||
2 | [email protected] | ||
3 | [email protected] "default" | ||
4 | [email protected] " " | ||
5 | [email protected] "impl" | ||
6 | [email protected] " " | ||
7 | [email protected] | ||
8 | [email protected] | ||
9 | [email protected] | ||
10 | [email protected] | ||
11 | [email protected] "T" | ||
12 | [email protected] " " | ||
13 | [email protected] "for" | ||
14 | [email protected] " " | ||
15 | [email protected] | ||
16 | [email protected] | ||
17 | [email protected] | ||
18 | [email protected] | ||
19 | [email protected] "Foo" | ||
20 | [email protected] " " | ||
21 | [email protected] | ||
22 | [email protected] "{" | ||
23 | [email protected] "}" | ||
24 | [email protected] "\n" | ||
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0164_default_item.rs b/crates/ra_syntax/test_data/parser/inline/ok/0164_default_item.rs new file mode 100644 index 000000000..a6836cbd5 --- /dev/null +++ b/crates/ra_syntax/test_data/parser/inline/ok/0164_default_item.rs | |||
@@ -0,0 +1 @@ | |||
default impl T for Foo {} | |||
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/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/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 {} | ||