File tree Expand file tree Collapse file tree 1 file changed +16
-9
lines changed
crates/ide/src/completion Expand file tree Collapse file tree 1 file changed +16
-9
lines changed Original file line number Diff line number Diff line change @@ -277,18 +277,25 @@ mod tests {
277277 ) ;
278278 }
279279
280- // FIXME binart modules are not picked up in tests
280+ // FIXME binary modules are not supported in tests properly
281+ // Binary modules are a bit special, they allow importing the modules from `/src/bin`
282+ // and that's why are good to test two things:
283+ // * no cycles are allowed in mod declarations
284+ // * no modules from the parent directory are proposed
285+ // Unfortunately, binary modules support is in cargo not rustc,
286+ // hence the test does not work now
287+ //
281288 // #[test]
282289 // fn regular_bin_module_completion() {
283290 // check(
284291 // r#"
285- // //- /src/main .rs
292+ // //- /src/bin .rs
286293 // fn main() {}
287- // //- /src/main /foo.rs
294+ // //- /src/bin /foo.rs
288295 // mod <|>
289- // //- /src/main /bar.rs
296+ // //- /src/bin /bar.rs
290297 // fn bar() {}
291- // //- /src/main /bar/bar_ignored.rs
298+ // //- /src/bin /bar/bar_ignored.rs
292299 // fn bar_ignored() {}
293300 // "#,
294301 // expect![[r#"
@@ -301,14 +308,14 @@ mod tests {
301308 fn already_declared_bin_module_completion_omitted ( ) {
302309 check (
303310 r#"
304- //- /src/main .rs
311+ //- /src/bin .rs
305312 fn main() {}
306- //- /src/main /foo.rs
313+ //- /src/bin /foo.rs
307314 mod <|>
308- //- /src/main /bar.rs
315+ //- /src/bin /bar.rs
309316 mod foo;
310317 fn bar() {}
311- //- /src/main /bar/bar_ignored.rs
318+ //- /src/bin /bar/bar_ignored.rs
312319 fn bar_ignored() {}
313320 "# ,
314321 expect ! [ [ r#""# ] ] ,
You can’t perform that action at this time.
0 commit comments