diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2021-05-26 21:43:53 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2021-05-26 21:43:53 +0100 |
commit | 666fc1cec10a41f88db56dfb339785eb1e7dd521 (patch) | |
tree | b06cb9f920a95da9289005e8a8b98d15834be439 /crates/ide_completion/src/render.rs | |
parent | 8389510f8d15e67ab112343ef876db1c8b01e36e (diff) | |
parent | 7d865ef071a78736866a9e73d0348352f4332754 (diff) |
Merge #9015
9015: Merge pattern completion related bools into an enum r=Veykril a=Veykril
The two bools can never both be set so this is basically just a tri-state enum.
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 | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ide_completion/src/render.rs b/crates/ide_completion/src/render.rs index d7f96b864..21f0da5f8 100644 --- a/crates/ide_completion/src/render.rs +++ b/crates/ide_completion/src/render.rs | |||
@@ -20,6 +20,7 @@ use ide_db::{ | |||
20 | use syntax::TextRange; | 20 | use syntax::TextRange; |
21 | 21 | ||
22 | use crate::{ | 22 | use crate::{ |
23 | context::IsPatOrConst, | ||
23 | item::{CompletionRelevanceTypeMatch, ImportEdit}, | 24 | item::{CompletionRelevanceTypeMatch, ImportEdit}, |
24 | CompletionContext, CompletionItem, CompletionItemKind, CompletionKind, CompletionRelevance, | 25 | CompletionContext, CompletionItem, CompletionItemKind, CompletionKind, CompletionRelevance, |
25 | }; | 26 | }; |
@@ -188,8 +189,7 @@ impl<'a> Render<'a> { | |||
188 | return render_fn(self.ctx, import_to_add, Some(local_name), *func); | 189 | return render_fn(self.ctx, import_to_add, Some(local_name), *func); |
189 | } | 190 | } |
190 | ScopeDef::ModuleDef(Variant(_)) | 191 | ScopeDef::ModuleDef(Variant(_)) |
191 | if self.ctx.completion.is_pat_binding_or_const | 192 | if self.ctx.completion.is_pat_or_const != IsPatOrConst::No => |
192 | | self.ctx.completion.is_irrefutable_pat_binding => | ||
193 | { | 193 | { |
194 | CompletionItemKind::SymbolKind(SymbolKind::Variant) | 194 | CompletionItemKind::SymbolKind(SymbolKind::Variant) |
195 | } | 195 | } |