aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--crates/ra_ide/src/completion/complete_trait_impl.rs17
1 files changed, 8 insertions, 9 deletions
diff --git a/crates/ra_ide/src/completion/complete_trait_impl.rs b/crates/ra_ide/src/completion/complete_trait_impl.rs
index bff19c5bb..54301cdf2 100644
--- a/crates/ra_ide/src/completion/complete_trait_impl.rs
+++ b/crates/ra_ide/src/completion/complete_trait_impl.rs
@@ -1,21 +1,20 @@
1//! FIXME: write short doc here 1//! FIXME: write short doc here
2 2
3use crate::{
4 completion::{
5 CompletionContext, CompletionItem, CompletionItemKind, CompletionKind, Completions,
6 },
7 display::FunctionSignature,
8};
9
10use hir::{self, Docs, HasSource}; 3use hir::{self, Docs, HasSource};
4use ra_assists::utils::get_missing_impl_items;
11use ra_syntax::{ 5use ra_syntax::{
12 ast::{self, edit}, 6 ast::{self, edit},
13 AstNode, SyntaxKind, SyntaxNode, TextRange, 7 AstNode, SyntaxKind, SyntaxNode, TextRange,
14}; 8};
15
16use ra_assists::utils::get_missing_impl_items;
17use ra_text_edit::TextEdit; 9use ra_text_edit::TextEdit;
18 10
11use crate::{
12 completion::{
13 CompletionContext, CompletionItem, CompletionItemKind, CompletionKind, Completions,
14 },
15 display::FunctionSignature,
16};
17
19pub(crate) fn complete_trait_impl(acc: &mut Completions, ctx: &CompletionContext) { 18pub(crate) fn complete_trait_impl(acc: &mut Completions, ctx: &CompletionContext) {
20 let trigger = ctx.token.ancestors().find(|p| match p.kind() { 19 let trigger = ctx.token.ancestors().find(|p| match p.kind() {
21 SyntaxKind::FN_DEF | SyntaxKind::TYPE_ALIAS_DEF | SyntaxKind::CONST_DEF => true, 20 SyntaxKind::FN_DEF | SyntaxKind::TYPE_ALIAS_DEF | SyntaxKind::CONST_DEF => true,