aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_analysis/src/completion/complete_scope.rs
diff options
context:
space:
mode:
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 }