diff options
-rw-r--r-- | crates/ra_ide/src/completion/complete_trait_impl.rs | 17 |
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 | ||
3 | use crate::{ | ||
4 | completion::{ | ||
5 | CompletionContext, CompletionItem, CompletionItemKind, CompletionKind, Completions, | ||
6 | }, | ||
7 | display::FunctionSignature, | ||
8 | }; | ||
9 | |||
10 | use hir::{self, Docs, HasSource}; | 3 | use hir::{self, Docs, HasSource}; |
4 | use ra_assists::utils::get_missing_impl_items; | ||
11 | use ra_syntax::{ | 5 | use ra_syntax::{ |
12 | ast::{self, edit}, | 6 | ast::{self, edit}, |
13 | AstNode, SyntaxKind, SyntaxNode, TextRange, | 7 | AstNode, SyntaxKind, SyntaxNode, TextRange, |
14 | }; | 8 | }; |
15 | |||
16 | use ra_assists::utils::get_missing_impl_items; | ||
17 | use ra_text_edit::TextEdit; | 9 | use ra_text_edit::TextEdit; |
18 | 10 | ||
11 | use crate::{ | ||
12 | completion::{ | ||
13 | CompletionContext, CompletionItem, CompletionItemKind, CompletionKind, Completions, | ||
14 | }, | ||
15 | display::FunctionSignature, | ||
16 | }; | ||
17 | |||
19 | pub(crate) fn complete_trait_impl(acc: &mut Completions, ctx: &CompletionContext) { | 18 | pub(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, |