aboutsummaryrefslogtreecommitdiff
path: root/crates/completion/src
diff options
context:
space:
mode:
Diffstat (limited to 'crates/completion/src')
-rw-r--r--crates/completion/src/completions/trait_impl.rs2
-rw-r--r--crates/completion/src/render/const_.rs1
-rw-r--r--crates/completion/src/render/function.rs1
-rw-r--r--crates/completion/src/render/macro_.rs1
-rw-r--r--crates/completion/src/render/type_alias.rs1
5 files changed, 6 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());
diff --git a/crates/completion/src/render/const_.rs b/crates/completion/src/render/const_.rs
index a8820a4fe..648a1afc5 100644
--- a/crates/completion/src/render/const_.rs
+++ b/crates/completion/src/render/const_.rs
@@ -27,6 +27,7 @@ struct ConstRender<'a> {
27 27
28impl<'a> ConstRender<'a> { 28impl<'a> ConstRender<'a> {
29 fn new(ctx: RenderContext<'a>, const_: hir::Const) -> ConstRender<'a> { 29 fn new(ctx: RenderContext<'a>, const_: hir::Const) -> ConstRender<'a> {
30 #[allow(deprecated)]
30 let ast_node = const_.source_old(ctx.db()).value; 31 let ast_node = const_.source_old(ctx.db()).value;
31 ConstRender { ctx, const_, ast_node } 32 ConstRender { ctx, const_, ast_node }
32 } 33 }
diff --git a/crates/completion/src/render/function.rs b/crates/completion/src/render/function.rs
index d9ea425a0..4c8996204 100644
--- a/crates/completion/src/render/function.rs
+++ b/crates/completion/src/render/function.rs
@@ -34,6 +34,7 @@ impl<'a> FunctionRender<'a> {
34 fn_: hir::Function, 34 fn_: hir::Function,
35 ) -> FunctionRender<'a> { 35 ) -> FunctionRender<'a> {
36 let name = local_name.unwrap_or_else(|| fn_.name(ctx.db()).to_string()); 36 let name = local_name.unwrap_or_else(|| fn_.name(ctx.db()).to_string());
37 #[allow(deprecated)]
37 let ast_node = fn_.source_old(ctx.db()).value; 38 let ast_node = fn_.source_old(ctx.db()).value;
38 39
39 FunctionRender { ctx, name, func: fn_, ast_node } 40 FunctionRender { ctx, name, func: fn_, ast_node }
diff --git a/crates/completion/src/render/macro_.rs b/crates/completion/src/render/macro_.rs
index 3d13fd9e2..95408ff9a 100644
--- a/crates/completion/src/render/macro_.rs
+++ b/crates/completion/src/render/macro_.rs
@@ -96,6 +96,7 @@ impl<'a> MacroRender<'a> {
96 } 96 }
97 97
98 fn detail(&self) -> String { 98 fn detail(&self) -> String {
99 #[allow(deprecated)]
99 let ast_node = self.macro_.source_old(self.ctx.db()).value; 100 let ast_node = self.macro_.source_old(self.ctx.db()).value;
100 macro_label(&ast_node) 101 macro_label(&ast_node)
101 } 102 }
diff --git a/crates/completion/src/render/type_alias.rs b/crates/completion/src/render/type_alias.rs
index 4099a5d0e..276090015 100644
--- a/crates/completion/src/render/type_alias.rs
+++ b/crates/completion/src/render/type_alias.rs
@@ -27,6 +27,7 @@ struct TypeAliasRender<'a> {
27 27
28impl<'a> TypeAliasRender<'a> { 28impl<'a> TypeAliasRender<'a> {
29 fn new(ctx: RenderContext<'a>, type_alias: hir::TypeAlias) -> TypeAliasRender<'a> { 29 fn new(ctx: RenderContext<'a>, type_alias: hir::TypeAlias) -> TypeAliasRender<'a> {
30 #[allow(deprecated)]
30 let ast_node = type_alias.source_old(ctx.db()).value; 31 let ast_node = type_alias.source_old(ctx.db()).value;
31 TypeAliasRender { ctx, type_alias, ast_node } 32 TypeAliasRender { ctx, type_alias, ast_node }
32 } 33 }