diff options
author | Nick Spain <[email protected]> | 2021-01-01 02:50:50 +0000 |
---|---|---|
committer | Nick Spain <[email protected]> | 2021-01-02 10:53:51 +0000 |
commit | ea4708c444509449b86c50b7b1b23f9ff5af4e97 (patch) | |
tree | 2c5c5c17589f0457ba9e63b4370eb9c6951b1d87 /crates/completion/src/completions | |
parent | 2de2b1eca3c3a3a74c0374f4de0b0c3ff25e66a9 (diff) |
Mark HasSource::source_old as deprecated but allow at all call sites
Diffstat (limited to 'crates/completion/src/completions')
-rw-r--r-- | crates/completion/src/completions/trait_impl.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/crates/completion/src/completions/trait_impl.rs b/crates/completion/src/completions/trait_impl.rs index 759253c53..43b3d939f 100644 --- a/crates/completion/src/completions/trait_impl.rs +++ b/crates/completion/src/completions/trait_impl.rs | |||
@@ -156,6 +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 | #[allow(deprecated)] | ||
159 | let function_decl = function_declaration(&func.source_old(ctx.db).value); | 160 | let function_decl = function_declaration(&func.source_old(ctx.db).value); |
160 | match ctx.config.snippet_cap { | 161 | match ctx.config.snippet_cap { |
161 | Some(cap) => { | 162 | Some(cap) => { |
@@ -200,6 +201,7 @@ fn add_const_impl( | |||
200 | let const_name = const_.name(ctx.db).map(|n| n.to_string()); | 201 | let const_name = const_.name(ctx.db).map(|n| n.to_string()); |
201 | 202 | ||
202 | if let Some(const_name) = const_name { | 203 | if let Some(const_name) = const_name { |
204 | #[allow(deprecated)] | ||
203 | let snippet = make_const_compl_syntax(&const_.source_old(ctx.db).value); | 205 | let snippet = make_const_compl_syntax(&const_.source_old(ctx.db).value); |
204 | 206 | ||
205 | let range = TextRange::new(const_def_node.text_range().start(), ctx.source_range().end()); | 207 | let range = TextRange::new(const_def_node.text_range().start(), ctx.source_range().end()); |