From e4de2c8d7f5ced7a24d0a76213ab113218c99d30 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Thu, 27 Dec 2018 17:33:52 +0300 Subject: add function to completion ctx --- crates/ra_analysis/src/completion/complete_keyword.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crates/ra_analysis/src/completion/complete_keyword.rs') diff --git a/crates/ra_analysis/src/completion/complete_keyword.rs b/crates/ra_analysis/src/completion/complete_keyword.rs index 5427fcb11..d1e0a20a8 100644 --- a/crates/ra_analysis/src/completion/complete_keyword.rs +++ b/crates/ra_analysis/src/completion/complete_keyword.rs @@ -18,7 +18,7 @@ pub(super) fn complete_expr_keyword(acc: &mut Completions, ctx: &CompletionConte if !ctx.is_trivial_path { return; } - let fn_def = match ctx.enclosing_fn { + let fn_def = match ctx.function_syntax { Some(it) => it, None => return, }; -- cgit v1.2.3