aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide/src/completion/complete_trait_impl.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_ide/src/completion/complete_trait_impl.rs')
-rw-r--r--crates/ra_ide/src/completion/complete_trait_impl.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_ide/src/completion/complete_trait_impl.rs b/crates/ra_ide/src/completion/complete_trait_impl.rs
index ded1ff3bc..fab02945c 100644
--- a/crates/ra_ide/src/completion/complete_trait_impl.rs
+++ b/crates/ra_ide/src/completion/complete_trait_impl.rs
@@ -35,7 +35,7 @@ use hir::{self, Docs, HasSource};
35use ra_assists::utils::get_missing_impl_items; 35use ra_assists::utils::get_missing_impl_items;
36use ra_syntax::{ 36use ra_syntax::{
37 ast::{self, edit, ImplDef}, 37 ast::{self, edit, ImplDef},
38 AstNode, SyntaxKind, SyntaxNode, TextRange, 38 AstNode, SyntaxKind, SyntaxNode, TextRange, T,
39}; 39};
40use ra_text_edit::TextEdit; 40use ra_text_edit::TextEdit;
41 41
@@ -204,7 +204,7 @@ fn make_const_compl_syntax(const_: &ast::ConstDef) -> String {
204 let end = const_ 204 let end = const_
205 .syntax() 205 .syntax()
206 .children_with_tokens() 206 .children_with_tokens()
207 .find(|s| s.kind() == SyntaxKind::SEMI || s.kind() == SyntaxKind::EQ) 207 .find(|s| s.kind() == T![;] || s.kind() == T![=])
208 .map_or(const_end, |f| f.text_range().start()); 208 .map_or(const_end, |f| f.text_range().start());
209 209
210 let len = end - start; 210 let len = end - start;