diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2021-05-26 22:49:06 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2021-05-26 22:49:06 +0100 |
commit | 7624729d61ac6d810ed77ce6aaf5d3e5b82824fd (patch) | |
tree | de41505a55f5f962704658d37f53fb424dd538b5 /crates/ide_completion/src/render.rs | |
parent | b4015b6aaa0dd80f5c85c7ed03e83d0d16042264 (diff) | |
parent | 1f897f7319da4852eac53ff765ed4e5b66a31b67 (diff) |
Merge #9016
9016: Set `record_pat_syntax` more precisely in CompletionContext r=Veykril a=Veykril
bors r+
Co-authored-by: Lukas Wirth <[email protected]>
Diffstat (limited to 'crates/ide_completion/src/render.rs')
-rw-r--r-- | crates/ide_completion/src/render.rs | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/crates/ide_completion/src/render.rs b/crates/ide_completion/src/render.rs index 21f0da5f8..91300c56e 100644 --- a/crates/ide_completion/src/render.rs +++ b/crates/ide_completion/src/render.rs | |||
@@ -20,7 +20,6 @@ use ide_db::{ | |||
20 | use syntax::TextRange; | 20 | use syntax::TextRange; |
21 | 21 | ||
22 | use crate::{ | 22 | use crate::{ |
23 | context::IsPatOrConst, | ||
24 | item::{CompletionRelevanceTypeMatch, ImportEdit}, | 23 | item::{CompletionRelevanceTypeMatch, ImportEdit}, |
25 | CompletionContext, CompletionItem, CompletionItemKind, CompletionKind, CompletionRelevance, | 24 | CompletionContext, CompletionItem, CompletionItemKind, CompletionKind, CompletionRelevance, |
26 | }; | 25 | }; |
@@ -188,9 +187,7 @@ impl<'a> Render<'a> { | |||
188 | ScopeDef::ModuleDef(Function(func)) => { | 187 | ScopeDef::ModuleDef(Function(func)) => { |
189 | return render_fn(self.ctx, import_to_add, Some(local_name), *func); | 188 | return render_fn(self.ctx, import_to_add, Some(local_name), *func); |
190 | } | 189 | } |
191 | ScopeDef::ModuleDef(Variant(_)) | 190 | ScopeDef::ModuleDef(Variant(_)) if self.ctx.completion.is_pat_or_const.is_some() => { |
192 | if self.ctx.completion.is_pat_or_const != IsPatOrConst::No => | ||
193 | { | ||
194 | CompletionItemKind::SymbolKind(SymbolKind::Variant) | 191 | CompletionItemKind::SymbolKind(SymbolKind::Variant) |
195 | } | 192 | } |
196 | ScopeDef::ModuleDef(Variant(var)) => { | 193 | ScopeDef::ModuleDef(Variant(var)) => { |