This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +51
-0
lines changed
crates/ide-completion/src/tests Expand file tree Collapse file tree 1 file changed +51
-0
lines changed Original file line number Diff line number Diff line change @@ -214,6 +214,57 @@ fn in_trait_assoc_item_list() {
214
214
) ;
215
215
}
216
216
217
+ #[ test]
218
+ fn in_trait_assoc_fn_missing_body ( ) {
219
+ check (
220
+ r#"trait Foo { fn function(); $0 }"# ,
221
+ expect ! [ [ r#"
222
+ ma makro!(…) macro_rules! makro
223
+ md module
224
+ kw const
225
+ kw crate::
226
+ kw fn
227
+ kw self::
228
+ kw type
229
+ kw unsafe
230
+ "# ] ] ,
231
+ ) ;
232
+ }
233
+
234
+ #[ test]
235
+ fn in_trait_assoc_const_missing_body ( ) {
236
+ check (
237
+ r#"trait Foo { const CONST: (); $0 }"# ,
238
+ expect ! [ [ r#"
239
+ ma makro!(…) macro_rules! makro
240
+ md module
241
+ kw const
242
+ kw crate::
243
+ kw fn
244
+ kw self::
245
+ kw type
246
+ kw unsafe
247
+ "# ] ] ,
248
+ ) ;
249
+ }
250
+
251
+ #[ test]
252
+ fn in_trait_assoc_type_aliases_missing_ty ( ) {
253
+ check (
254
+ r#"trait Foo { type Type; $0 }"# ,
255
+ expect ! [ [ r#"
256
+ ma makro!(…) macro_rules! makro
257
+ md module
258
+ kw const
259
+ kw crate::
260
+ kw fn
261
+ kw self::
262
+ kw type
263
+ kw unsafe
264
+ "# ] ] ,
265
+ ) ;
266
+ }
267
+
217
268
#[ test]
218
269
fn in_trait_impl_assoc_item_list ( ) {
219
270
check (
You can’t perform that action at this time.
0 commit comments