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.rs6
1 files changed, 1 insertions, 5 deletions
diff --git a/crates/ra_ide/src/completion/completion_context.rs b/crates/ra_ide/src/completion/completion_context.rs
index dd9cc7daa..46e243192 100644
--- a/crates/ra_ide/src/completion/completion_context.rs
+++ b/crates/ra_ide/src/completion/completion_context.rs
@@ -11,7 +11,7 @@ use ra_syntax::{
11}; 11};
12use ra_text_edit::AtomTextEdit; 12use ra_text_edit::AtomTextEdit;
13 13
14use crate::{call_info::call_info, completion::CompletionConfig, CallInfo, FilePosition}; 14use crate::{completion::CompletionConfig, FilePosition};
15 15
16/// `CompletionContext` is created early during completion to figure out, where 16/// `CompletionContext` is created early during completion to figure out, where
17/// exactly is the cursor, syntax-wise. 17/// exactly is the cursor, syntax-wise.
@@ -34,7 +34,6 @@ pub(crate) struct CompletionContext<'a> {
34 pub(super) record_pat_syntax: Option<ast::RecordPat>, 34 pub(super) record_pat_syntax: Option<ast::RecordPat>,
35 pub(super) record_field_syntax: Option<ast::RecordField>, 35 pub(super) record_field_syntax: Option<ast::RecordField>,
36 pub(super) impl_def: Option<ast::ImplDef>, 36 pub(super) impl_def: Option<ast::ImplDef>,
37 pub(super) call_info: Option<CallInfo>,
38 pub(super) is_param: bool, 37 pub(super) is_param: bool,
39 /// If a name-binding or reference to a const in a pattern. 38 /// If a name-binding or reference to a const in a pattern.
40 /// Irrefutable patterns (like let) are excluded. 39 /// Irrefutable patterns (like let) are excluded.
@@ -95,7 +94,6 @@ impl<'a> CompletionContext<'a> {
95 krate, 94 krate,
96 name_ref_syntax: None, 95 name_ref_syntax: None,
97 function_syntax: None, 96 function_syntax: None,
98 call_info: None,
99 use_item_syntax: None, 97 use_item_syntax: None,
100 record_lit_syntax: None, 98 record_lit_syntax: None,
101 record_pat_syntax: None, 99 record_pat_syntax: None,
@@ -268,8 +266,6 @@ impl<'a> CompletionContext<'a> {
268 self.use_item_syntax = 266 self.use_item_syntax =
269 self.sema.ancestors_with_macros(self.token.parent()).find_map(ast::UseItem::cast); 267 self.sema.ancestors_with_macros(self.token.parent()).find_map(ast::UseItem::cast);
270 268
271 self.call_info = call_info(self.db, self.file_position);
272
273 self.function_syntax = self 269 self.function_syntax = self
274 .sema 270 .sema
275 .ancestors_with_macros(self.token.parent()) 271 .ancestors_with_macros(self.token.parent())