aboutsummaryrefslogtreecommitdiff
path: root/crates/ide_completion/src/completions/unqualified_path.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ide_completion/src/completions/unqualified_path.rs')
-rw-r--r--crates/ide_completion/src/completions/unqualified_path.rs8
1 files changed, 5 insertions, 3 deletions
diff --git a/crates/ide_completion/src/completions/unqualified_path.rs b/crates/ide_completion/src/completions/unqualified_path.rs
index 8ea5a2d5b..81c4fb305 100644
--- a/crates/ide_completion/src/completions/unqualified_path.rs
+++ b/crates/ide_completion/src/completions/unqualified_path.rs
@@ -74,9 +74,11 @@ pub(crate) fn complete_unqualified_path(acc: &mut Completions, ctx: &CompletionC
74 // Don't suggest attribute macros and derives. 74 // Don't suggest attribute macros and derives.
75 ScopeDef::MacroDef(mac) => mac.is_fn_like(), 75 ScopeDef::MacroDef(mac) => mac.is_fn_like(),
76 // no values in type places 76 // no values in type places
77 ScopeDef::ModuleDef(hir::ModuleDef::Function(_)) 77 ScopeDef::ModuleDef(
78 | ScopeDef::ModuleDef(hir::ModuleDef::Variant(_)) 78 hir::ModuleDef::Function(_)
79 | ScopeDef::ModuleDef(hir::ModuleDef::Static(_)) 79 | hir::ModuleDef::Variant(_)
80 | hir::ModuleDef::Static(_),
81 )
80 | ScopeDef::Local(_) => !ctx.expects_type(), 82 | ScopeDef::Local(_) => !ctx.expects_type(),
81 // unless its a constant in a generic arg list position 83 // unless its a constant in a generic arg list position
82 ScopeDef::ModuleDef(hir::ModuleDef::Const(_)) 84 ScopeDef::ModuleDef(hir::ModuleDef::Const(_))