Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide-completion/src/context.rs')
| -rw-r--r-- | crates/ide-completion/src/context.rs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/crates/ide-completion/src/context.rs b/crates/ide-completion/src/context.rs index 92aa1da89c..575f524209 100644 --- a/crates/ide-completion/src/context.rs +++ b/crates/ide-completion/src/context.rs @@ -186,14 +186,13 @@ impl TypeLocation { } pub(crate) fn complete_consts(&self) -> bool { - match self { + matches!( + self, TypeLocation::GenericArg { corresponding_param: Some(ast::GenericParam::ConstParam(_)), .. - } => true, - TypeLocation::AssocConstEq => true, - _ => false, - } + } | TypeLocation::AssocConstEq + ) } pub(crate) fn complete_types(&self) -> bool { |