diff options
Diffstat (limited to 'crates/ide_completion/src/render/function.rs')
-rw-r--r-- | crates/ide_completion/src/render/function.rs | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/crates/ide_completion/src/render/function.rs b/crates/ide_completion/src/render/function.rs index e46e21d24..5931945a8 100644 --- a/crates/ide_completion/src/render/function.rs +++ b/crates/ide_completion/src/render/function.rs | |||
@@ -3,7 +3,6 @@ | |||
3 | use hir::{HasSource, HirDisplay, Type}; | 3 | use hir::{HasSource, HirDisplay, Type}; |
4 | use ide_db::SymbolKind; | 4 | use ide_db::SymbolKind; |
5 | use syntax::ast::Fn; | 5 | use syntax::ast::Fn; |
6 | use test_utils::mark; | ||
7 | 6 | ||
8 | use crate::{ | 7 | use crate::{ |
9 | item::{CompletionItem, CompletionItemKind, CompletionKind, ImportEdit}, | 8 | item::{CompletionItem, CompletionItemKind, CompletionKind, ImportEdit}, |
@@ -82,7 +81,7 @@ impl<'a> FunctionRender<'a> { | |||
82 | self.func.method_params(self.ctx.db()).unwrap_or_default() | 81 | self.func.method_params(self.ctx.db()).unwrap_or_default() |
83 | } else { | 82 | } else { |
84 | if let Some(s) = ast_params.self_param() { | 83 | if let Some(s) = ast_params.self_param() { |
85 | mark::hit!(parens_for_method_call_as_assoc_fn); | 84 | cov_mark::hit!(parens_for_method_call_as_assoc_fn); |
86 | params_pats.push(Some(s.to_string())); | 85 | params_pats.push(Some(s.to_string())); |
87 | } | 86 | } |
88 | self.func.assoc_fn_params(self.ctx.db()) | 87 | self.func.assoc_fn_params(self.ctx.db()) |
@@ -114,8 +113,6 @@ impl<'a> FunctionRender<'a> { | |||
114 | 113 | ||
115 | #[cfg(test)] | 114 | #[cfg(test)] |
116 | mod tests { | 115 | mod tests { |
117 | use test_utils::mark; | ||
118 | |||
119 | use crate::{ | 116 | use crate::{ |
120 | test_utils::{check_edit, check_edit_with_config, TEST_CONFIG}, | 117 | test_utils::{check_edit, check_edit_with_config, TEST_CONFIG}, |
121 | CompletionConfig, | 118 | CompletionConfig, |
@@ -123,7 +120,7 @@ mod tests { | |||
123 | 120 | ||
124 | #[test] | 121 | #[test] |
125 | fn inserts_parens_for_function_calls() { | 122 | fn inserts_parens_for_function_calls() { |
126 | mark::check!(inserts_parens_for_function_calls); | 123 | cov_mark::check!(inserts_parens_for_function_calls); |
127 | check_edit( | 124 | check_edit( |
128 | "no_args", | 125 | "no_args", |
129 | r#" | 126 | r#" |
@@ -191,7 +188,7 @@ fn bar(s: &S) { | |||
191 | 188 | ||
192 | #[test] | 189 | #[test] |
193 | fn parens_for_method_call_as_assoc_fn() { | 190 | fn parens_for_method_call_as_assoc_fn() { |
194 | mark::check!(parens_for_method_call_as_assoc_fn); | 191 | cov_mark::check!(parens_for_method_call_as_assoc_fn); |
195 | check_edit( | 192 | check_edit( |
196 | "foo", | 193 | "foo", |
197 | r#" | 194 | r#" |
@@ -213,7 +210,7 @@ fn main() { S::foo(${1:&self})$0 } | |||
213 | 210 | ||
214 | #[test] | 211 | #[test] |
215 | fn suppress_arg_snippets() { | 212 | fn suppress_arg_snippets() { |
216 | mark::check!(suppress_arg_snippets); | 213 | cov_mark::check!(suppress_arg_snippets); |
217 | check_edit_with_config( | 214 | check_edit_with_config( |
218 | CompletionConfig { add_call_argument_snippets: false, ..TEST_CONFIG }, | 215 | CompletionConfig { add_call_argument_snippets: false, ..TEST_CONFIG }, |
219 | "with_args", | 216 | "with_args", |