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_snippet.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crates/ra_analysis/src/completion/complete_snippet.rs') diff --git a/crates/ra_analysis/src/completion/complete_snippet.rs b/crates/ra_analysis/src/completion/complete_snippet.rs index fb9da0a4f..a495751dd 100644 --- a/crates/ra_analysis/src/completion/complete_snippet.rs +++ b/crates/ra_analysis/src/completion/complete_snippet.rs @@ -7,7 +7,7 @@ fn snippet(label: &str, snippet: &str) -> Builder { } pub(super) fn complete_expr_snippet(acc: &mut Completions, ctx: &CompletionContext) { - if !(ctx.is_trivial_path && ctx.enclosing_fn.is_some()) { + if !(ctx.is_trivial_path && ctx.function_syntax.is_some()) { return; } snippet("pd", "eprintln!(\"$0 = {:?}\", $0);").add_to(acc); -- cgit v1.2.3