aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide_api/src/completion/completion_context.rs
diff options
context:
space:
mode:
authorbors[bot] <bors[bot]@users.noreply.github.com>2019-01-24 22:56:13 +0000
committerbors[bot] <bors[bot]@users.noreply.github.com>2019-01-24 22:56:13 +0000
commitc42db0bbd750fae19a91f0a0354240ea6c3bafce (patch)
treebeb7030248280fd8c67eb2b2c9cc4b19c6074c17 /crates/ra_ide_api/src/completion/completion_context.rs
parentb308375b82a33687f93468d75c7cc628b83a1351 (diff)
parent31d3a56b1865c33ef54e5d76e606965c87676695 (diff)
Merge #623
623: WIP: module id is not def id r=matklad a=matklad This achieves two things: * makes module_tree & item_map per crate, not per source_root * begins the refactoring to remove universal `DefId` in favor of having separate ids for each kind of `Def`. Currently, only modules get a differnt ID though. Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_ide_api/src/completion/completion_context.rs')
-rw-r--r--crates/ra_ide_api/src/completion/completion_context.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/ra_ide_api/src/completion/completion_context.rs b/crates/ra_ide_api/src/completion/completion_context.rs
index ca2069e2a..578af6e5b 100644
--- a/crates/ra_ide_api/src/completion/completion_context.rs
+++ b/crates/ra_ide_api/src/completion/completion_context.rs
@@ -127,7 +127,7 @@ impl<'a> CompletionContext<'a> {
127 .ancestors() 127 .ancestors()
128 .take_while(|it| it.kind() != SOURCE_FILE && it.kind() != MODULE) 128 .take_while(|it| it.kind() != SOURCE_FILE && it.kind() != MODULE)
129 .find_map(ast::FnDef::cast); 129 .find_map(ast::FnDef::cast);
130 match (&self.module, self.function_syntax) { 130 match (self.module, self.function_syntax) {
131 (Some(module), Some(fn_def)) => { 131 (Some(module), Some(fn_def)) => {
132 let function = source_binder::function_from_module(self.db, module, fn_def); 132 let function = source_binder::function_from_module(self.db, module, fn_def);
133 self.function = Some(function); 133 self.function = Some(function);