From 354ad29493dbb258c11190abd7632af95c538e16 Mon Sep 17 00:00:00 2001 From: Lukas Wirth Date: Wed, 16 Jun 2021 15:08:44 +0200 Subject: Filter out non-type completions in the respective completions modules instead --- crates/ide_completion/src/context.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'crates/ide_completion/src/context.rs') diff --git a/crates/ide_completion/src/context.rs b/crates/ide_completion/src/context.rs index 4c3929a26..a8437d81c 100644 --- a/crates/ide_completion/src/context.rs +++ b/crates/ide_completion/src/context.rs @@ -276,6 +276,10 @@ impl<'a> CompletionContext<'a> { matches!(self.completion_location, Some(ImmediateLocation::ItemList)) } + pub(crate) fn expects_generic_arg(&self) -> bool { + matches!(self.completion_location, Some(ImmediateLocation::GenericArgList(_))) + } + pub(crate) fn has_block_expr_parent(&self) -> bool { matches!(self.completion_location, Some(ImmediateLocation::BlockExpr)) } -- cgit v1.2.3