aboutsummaryrefslogtreecommitdiff
path: root/crates/ide_completion/src/completions/snippet.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ide_completion/src/completions/snippet.rs')
-rw-r--r--crates/ide_completion/src/completions/snippet.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/crates/ide_completion/src/completions/snippet.rs b/crates/ide_completion/src/completions/snippet.rs
index 81ddfa34f..cbc20cc2c 100644
--- a/crates/ide_completion/src/completions/snippet.rs
+++ b/crates/ide_completion/src/completions/snippet.rs
@@ -36,7 +36,11 @@ pub(crate) fn complete_expr_snippet(acc: &mut Completions, ctx: &CompletionConte
36} 36}
37 37
38pub(crate) fn complete_item_snippet(acc: &mut Completions, ctx: &CompletionContext) { 38pub(crate) fn complete_item_snippet(acc: &mut Completions, ctx: &CompletionContext) {
39 if !ctx.expects_item() || ctx.previous_token_is(T![unsafe]) || ctx.path_qual().is_some() { 39 if !ctx.expects_item()
40 || ctx.previous_token_is(T![unsafe])
41 || ctx.path_qual().is_some()
42 || ctx.has_impl_or_trait_prev_sibling()
43 {
40 return; 44 return;
41 } 45 }
42 if ctx.has_visibility_prev_sibling() { 46 if ctx.has_visibility_prev_sibling() {