Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide-completion/src/render.rs')
-rw-r--r--crates/ide-completion/src/render.rs13
1 files changed, 12 insertions, 1 deletions
diff --git a/crates/ide-completion/src/render.rs b/crates/ide-completion/src/render.rs
index 86302cb067..eb2df395c4 100644
--- a/crates/ide-completion/src/render.rs
+++ b/crates/ide-completion/src/render.rs
@@ -32,11 +32,22 @@ pub(crate) struct RenderContext<'a> {
completion: &'a CompletionContext<'a>,
is_private_editable: bool,
import_to_add: Option<LocatedImport>,
+ // For variants which are missing
+ // in match completion context
+ //
+ // Option -> only applicable for enums
+ // bool -> is enum variant missing or not?
+ is_variant_missing: Option<bool>,
}
impl<'a> RenderContext<'a> {
pub(crate) fn new(completion: &'a CompletionContext<'a>) -> RenderContext<'a> {
- RenderContext { completion, is_private_editable: false, import_to_add: None }
+ RenderContext {
+ completion,
+ is_private_editable: false,
+ import_to_add: None,
+ is_variant_missing: None,
+ }
}
pub(crate) fn private_editable(mut self, private_editable: bool) -> Self {