aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide_api/src/completion
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2019-04-11 13:34:13 +0100
committerAleksey Kladov <[email protected]>2019-04-11 14:29:33 +0100
commit505acc973b3b865195d7d0aeb47c419c35f6bbbc (patch)
treef5130e4e301e2adadf12f0b69f65f6cc19480ed0 /crates/ra_ide_api/src/completion
parent10d66d63d716a10ba7a5a8d1b69c9066249caf69 (diff)
Make call info to use real name resolution
Diffstat (limited to 'crates/ra_ide_api/src/completion')
-rw-r--r--crates/ra_ide_api/src/completion/completion_context.rs6
1 files changed, 0 insertions, 6 deletions
diff --git a/crates/ra_ide_api/src/completion/completion_context.rs b/crates/ra_ide_api/src/completion/completion_context.rs
index ce21fca9b..ddcf46b4e 100644
--- a/crates/ra_ide_api/src/completion/completion_context.rs
+++ b/crates/ra_ide_api/src/completion/completion_context.rs
@@ -19,7 +19,6 @@ pub(crate) struct CompletionContext<'a> {
19 pub(super) token: SyntaxToken<'a>, 19 pub(super) token: SyntaxToken<'a>,
20 pub(super) resolver: Resolver, 20 pub(super) resolver: Resolver,
21 pub(super) module: Option<hir::Module>, 21 pub(super) module: Option<hir::Module>,
22 pub(super) function: Option<hir::Function>,
23 pub(super) function_syntax: Option<&'a ast::FnDef>, 22 pub(super) function_syntax: Option<&'a ast::FnDef>,
24 pub(super) use_item_syntax: Option<&'a ast::UseItem>, 23 pub(super) use_item_syntax: Option<&'a ast::UseItem>,
25 pub(super) struct_lit_syntax: Option<&'a ast::StructLit>, 24 pub(super) struct_lit_syntax: Option<&'a ast::StructLit>,
@@ -59,7 +58,6 @@ impl<'a> CompletionContext<'a> {
59 offset: position.offset, 58 offset: position.offset,
60 resolver, 59 resolver,
61 module, 60 module,
62 function: None,
63 function_syntax: None, 61 function_syntax: None,
64 use_item_syntax: None, 62 use_item_syntax: None,
65 struct_lit_syntax: None, 63 struct_lit_syntax: None,
@@ -150,10 +148,6 @@ impl<'a> CompletionContext<'a> {
150 .ancestors() 148 .ancestors()
151 .take_while(|it| it.kind() != SOURCE_FILE && it.kind() != MODULE) 149 .take_while(|it| it.kind() != SOURCE_FILE && it.kind() != MODULE)
152 .find_map(ast::FnDef::cast); 150 .find_map(ast::FnDef::cast);
153 if let (Some(module), Some(fn_def)) = (self.module, self.function_syntax) {
154 let function = source_binder::function_from_module(self.db, module, fn_def);
155 self.function = Some(function);
156 }
157 151
158 let parent = match name_ref.syntax().parent() { 152 let parent = match name_ref.syntax().parent() {
159 Some(it) => it, 153 Some(it) => it,