diff options
author | bors[bot] <bors[bot]@users.noreply.github.com> | 2018-12-27 14:35:22 +0000 |
---|---|---|
committer | bors[bot] <bors[bot]@users.noreply.github.com> | 2018-12-27 14:35:22 +0000 |
commit | 3b820bcca3a66660d0c5960f2a5c8f765095333e (patch) | |
tree | b7e3edf5a0bebb168330ac56a261ed5b0a90d43e /crates/ra_analysis/src/completion/complete_snippet.rs | |
parent | 7a1ed6400dbc57656eebc345f7e2ffa963bf808e (diff) | |
parent | e4de2c8d7f5ced7a24d0a76213ab113218c99d30 (diff) |
Merge #346
346: add function to completion ctx r=matklad a=matklad
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_analysis/src/completion/complete_snippet.rs')
-rw-r--r-- | crates/ra_analysis/src/completion/complete_snippet.rs | 2 |
1 files changed, 1 insertions, 1 deletions
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 { | |||
7 | } | 7 | } |
8 | 8 | ||
9 | pub(super) fn complete_expr_snippet(acc: &mut Completions, ctx: &CompletionContext) { | 9 | pub(super) fn complete_expr_snippet(acc: &mut Completions, ctx: &CompletionContext) { |
10 | if !(ctx.is_trivial_path && ctx.enclosing_fn.is_some()) { | 10 | if !(ctx.is_trivial_path && ctx.function_syntax.is_some()) { |
11 | return; | 11 | return; |
12 | } | 12 | } |
13 | snippet("pd", "eprintln!(\"$0 = {:?}\", $0);").add_to(acc); | 13 | snippet("pd", "eprintln!(\"$0 = {:?}\", $0);").add_to(acc); |