aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_analysis/src/completion/complete_scope.rs
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2018-12-27 14:33:52 +0000
committerAleksey Kladov <[email protected]>2018-12-27 14:33:52 +0000
commite4de2c8d7f5ced7a24d0a76213ab113218c99d30 (patch)
treeb7e3edf5a0bebb168330ac56a261ed5b0a90d43e /crates/ra_analysis/src/completion/complete_scope.rs
parent7a1ed6400dbc57656eebc345f7e2ffa963bf808e (diff)
add function to completion ctx
Diffstat (limited to 'crates/ra_analysis/src/completion/complete_scope.rs')
-rw-r--r--crates/ra_analysis/src/completion/complete_scope.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/crates/ra_analysis/src/completion/complete_scope.rs b/crates/ra_analysis/src/completion/complete_scope.rs
index a57670e3b..514fd2f88 100644
--- a/crates/ra_analysis/src/completion/complete_scope.rs
+++ b/crates/ra_analysis/src/completion/complete_scope.rs
@@ -14,8 +14,7 @@ pub(super) fn complete_scope(acc: &mut Completions, ctx: &CompletionContext) ->
14 Some(it) => it, 14 Some(it) => it,
15 None => return Ok(()), 15 None => return Ok(()),
16 }; 16 };
17 if let Some(fn_def) = ctx.enclosing_fn { 17 if let Some(function) = &ctx.function {
18 let function = hir::source_binder::function_from_module(ctx.db, module, fn_def);
19 let scopes = function.scopes(ctx.db); 18 let scopes = function.scopes(ctx.db);
20 complete_fn(acc, &scopes, ctx.offset); 19 complete_fn(acc, &scopes, ctx.offset);
21 } 20 }