diff options
author | Lukas Wirth <[email protected]> | 2021-06-16 14:08:44 +0100 |
---|---|---|
committer | Lukas Wirth <[email protected]> | 2021-06-16 14:08:44 +0100 |
commit | 354ad29493dbb258c11190abd7632af95c538e16 (patch) | |
tree | 09418c3c079d2a849cc99aaeddf5feaab39317f3 /crates/ide_completion/src/context.rs | |
parent | 79703efc7fddce3f0080d3d97c200d6a2a2ffaa9 (diff) |
Filter out non-type completions in the respective completions modules instead
Diffstat (limited to 'crates/ide_completion/src/context.rs')
-rw-r--r-- | crates/ide_completion/src/context.rs | 4 |
1 files changed, 4 insertions, 0 deletions
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> { | |||
276 | matches!(self.completion_location, Some(ImmediateLocation::ItemList)) | 276 | matches!(self.completion_location, Some(ImmediateLocation::ItemList)) |
277 | } | 277 | } |
278 | 278 | ||
279 | pub(crate) fn expects_generic_arg(&self) -> bool { | ||
280 | matches!(self.completion_location, Some(ImmediateLocation::GenericArgList(_))) | ||
281 | } | ||
282 | |||
279 | pub(crate) fn has_block_expr_parent(&self) -> bool { | 283 | pub(crate) fn has_block_expr_parent(&self) -> bool { |
280 | matches!(self.completion_location, Some(ImmediateLocation::BlockExpr)) | 284 | matches!(self.completion_location, Some(ImmediateLocation::BlockExpr)) |
281 | } | 285 | } |