Skip to content

Commit ca698a0

Browse files
Adjust the test comment
1 parent 492e3c4 commit ca698a0

File tree

1 file changed

+16
-9
lines changed

1 file changed

+16
-9
lines changed

crates/ide/src/completion/complete_mod.rs

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff 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#""#]],

0 commit comments

Comments
 (0)