aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide/src/completion
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_ide/src/completion')
-rw-r--r--crates/ra_ide/src/completion/completion_context.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/crates/ra_ide/src/completion/completion_context.rs b/crates/ra_ide/src/completion/completion_context.rs
index f833d2a9a..0e34d85db 100644
--- a/crates/ra_ide/src/completion/completion_context.rs
+++ b/crates/ra_ide/src/completion/completion_context.rs
@@ -190,7 +190,10 @@ impl<'a> CompletionContext<'a> {
190 if let Some(name) = find_node_at_offset::<ast::Name>(&file_with_fake_ident, offset) { 190 if let Some(name) = find_node_at_offset::<ast::Name>(&file_with_fake_ident, offset) {
191 if let Some(bind_pat) = name.syntax().ancestors().find_map(ast::BindPat::cast) { 191 if let Some(bind_pat) = name.syntax().ancestors().find_map(ast::BindPat::cast) {
192 self.is_pat_binding_or_const = true; 192 self.is_pat_binding_or_const = true;
193 if bind_pat.has_at() || bind_pat.is_ref() || bind_pat.is_mutable() { 193 if bind_pat.at_token().is_some()
194 || bind_pat.ref_kw_token().is_some()
195 || bind_pat.mut_kw_token().is_some()
196 {
194 self.is_pat_binding_or_const = false; 197 self.is_pat_binding_or_const = false;
195 } 198 }
196 if bind_pat.syntax().parent().and_then(ast::RecordFieldPatList::cast).is_some() { 199 if bind_pat.syntax().parent().and_then(ast::RecordFieldPatList::cast).is_some() {