We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 4e1a3da + bd3feea commit b7e8b9aCopy full SHA for b7e8b9a
crates/ide-completion/src/completions/mod_.rs
@@ -53,6 +53,7 @@ pub(crate) fn complete_mod(
53
let existing_mod_declarations = current_module
54
.children(ctx.db)
55
.filter_map(|module| Some(module.name(ctx.db)?.to_string()))
56
+ .filter(|module| module != ctx.original_token.text())
57
.collect::<FxHashSet<_>>();
58
59
let module_declaration_file =
@@ -351,4 +352,23 @@ fn ignored_bar() {}
351
352
"#]],
353
);
354
}
355
+
356
+ #[test]
357
+ fn semi_colon_completion() {
358
+ check(
359
+ r#"
360
+//- /lib.rs
361
+mod foo;
362
+//- /foo.rs
363
+mod bar {
364
+ mod baz$0
365
+}
366
+//- /foo/bar/baz.rs
367
+fn baz() {}
368
+"#,
369
+ expect![[r#"
370
+ md baz;
371
+ "#]],
372
+ );
373
+ }
374
0 commit comments