aboutsummaryrefslogtreecommitdiff
path: root/crates/completion/src/completions/trait_impl.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/completion/src/completions/trait_impl.rs')
-rw-r--r--crates/completion/src/completions/trait_impl.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/completion/src/completions/trait_impl.rs b/crates/completion/src/completions/trait_impl.rs
index c4e0d0669..759253c53 100644
--- a/crates/completion/src/completions/trait_impl.rs
+++ b/crates/completion/src/completions/trait_impl.rs
@@ -156,7 +156,7 @@ fn add_function_impl(
156 }; 156 };
157 let range = TextRange::new(fn_def_node.text_range().start(), ctx.source_range().end()); 157 let range = TextRange::new(fn_def_node.text_range().start(), ctx.source_range().end());
158 158
159 let function_decl = function_declaration(&func.source(ctx.db).value); 159 let function_decl = function_declaration(&func.source_old(ctx.db).value);
160 match ctx.config.snippet_cap { 160 match ctx.config.snippet_cap {
161 Some(cap) => { 161 Some(cap) => {
162 let snippet = format!("{} {{\n $0\n}}", function_decl); 162 let snippet = format!("{} {{\n $0\n}}", function_decl);
@@ -200,7 +200,7 @@ fn add_const_impl(
200 let const_name = const_.name(ctx.db).map(|n| n.to_string()); 200 let const_name = const_.name(ctx.db).map(|n| n.to_string());
201 201
202 if let Some(const_name) = const_name { 202 if let Some(const_name) = const_name {
203 let snippet = make_const_compl_syntax(&const_.source(ctx.db).value); 203 let snippet = make_const_compl_syntax(&const_.source_old(ctx.db).value);
204 204
205 let range = TextRange::new(const_def_node.text_range().start(), ctx.source_range().end()); 205 let range = TextRange::new(const_def_node.text_range().start(), ctx.source_range().end());
206 206