Skip to content

Commit b0380db

Browse files
authored
Merge pull request #19211 from Timmmm/user/timh/import_private
Include private items in completions for local crates
2 parents f63f845 + 8d91f1c commit b0380db

File tree

1 file changed

+4
-1
lines changed
  • crates/ide-completion/src/completions

1 file changed

+4
-1
lines changed

crates/ide-completion/src/completions/expr.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,10 @@ pub(crate) fn complete_expr_path(
147147
});
148148
match resolution {
149149
hir::PathResolution::Def(hir::ModuleDef::Module(module)) => {
150-
let module_scope = module.scope(ctx.db, Some(ctx.module));
150+
// Set visible_from to None so private items are returned.
151+
// They will be possibly filtered out in add_path_resolution()
152+
// via def_is_visible().
153+
let module_scope = module.scope(ctx.db, None);
151154
for (name, def) in module_scope {
152155
if scope_def_applicable(def) {
153156
acc.add_path_resolution(

0 commit comments

Comments
 (0)