diff options
author | Laurențiu Nicola <[email protected]> | 2021-03-08 20:19:44 +0000 |
---|---|---|
committer | Laurențiu Nicola <[email protected]> | 2021-03-08 20:19:44 +0000 |
commit | fc9eed4836dfc88fe2893c81b015ab440cea2ba6 (patch) | |
tree | 3905029a42c8bb6c5d363753b34cd6b5dd43f4d5 /crates/ide_ssr/src/resolving.rs | |
parent | c5189a22ccf4c28e309e4189defbb88b83bb2aea (diff) |
Use upstream cov-mark
Diffstat (limited to 'crates/ide_ssr/src/resolving.rs')
-rw-r--r-- | crates/ide_ssr/src/resolving.rs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/crates/ide_ssr/src/resolving.rs b/crates/ide_ssr/src/resolving.rs index 14e5a3b69..af94c7bb1 100644 --- a/crates/ide_ssr/src/resolving.rs +++ b/crates/ide_ssr/src/resolving.rs | |||
@@ -6,7 +6,6 @@ use ide_db::base_db::FilePosition; | |||
6 | use parsing::Placeholder; | 6 | use parsing::Placeholder; |
7 | use rustc_hash::FxHashMap; | 7 | use rustc_hash::FxHashMap; |
8 | use syntax::{ast, SmolStr, SyntaxKind, SyntaxNode, SyntaxToken}; | 8 | use syntax::{ast, SmolStr, SyntaxKind, SyntaxNode, SyntaxToken}; |
9 | use test_utils::mark; | ||
10 | 9 | ||
11 | pub(crate) struct ResolutionScope<'db> { | 10 | pub(crate) struct ResolutionScope<'db> { |
12 | scope: hir::SemanticsScope<'db>, | 11 | scope: hir::SemanticsScope<'db>, |
@@ -170,13 +169,13 @@ impl Resolver<'_, '_> { | |||
170 | // calls. e.g. `Foo::bar($s)` should match `x.bar()`. | 169 | // calls. e.g. `Foo::bar($s)` should match `x.bar()`. |
171 | true | 170 | true |
172 | } else { | 171 | } else { |
173 | mark::hit!(replace_associated_trait_default_function_call); | 172 | cov_mark::hit!(replace_associated_trait_default_function_call); |
174 | false | 173 | false |
175 | } | 174 | } |
176 | } | 175 | } |
177 | hir::PathResolution::AssocItem(_) => { | 176 | hir::PathResolution::AssocItem(_) => { |
178 | // Not a function. Could be a constant or an associated type. | 177 | // Not a function. Could be a constant or an associated type. |
179 | mark::hit!(replace_associated_trait_constant); | 178 | cov_mark::hit!(replace_associated_trait_constant); |
180 | false | 179 | false |
181 | } | 180 | } |
182 | _ => true, | 181 | _ => true, |
@@ -267,7 +266,7 @@ fn pick_node_for_resolution(node: SyntaxNode) -> SyntaxNode { | |||
267 | match node.kind() { | 266 | match node.kind() { |
268 | SyntaxKind::EXPR_STMT => { | 267 | SyntaxKind::EXPR_STMT => { |
269 | if let Some(n) = node.first_child() { | 268 | if let Some(n) = node.first_child() { |
270 | mark::hit!(cursor_after_semicolon); | 269 | cov_mark::hit!(cursor_after_semicolon); |
271 | return n; | 270 | return n; |
272 | } | 271 | } |
273 | } | 272 | } |
@@ -291,7 +290,7 @@ fn path_contains_type_arguments(path: Option<ast::Path>) -> bool { | |||
291 | if let Some(path) = path { | 290 | if let Some(path) = path { |
292 | if let Some(segment) = path.segment() { | 291 | if let Some(segment) = path.segment() { |
293 | if segment.generic_arg_list().is_some() { | 292 | if segment.generic_arg_list().is_some() { |
294 | mark::hit!(type_arguments_within_path); | 293 | cov_mark::hit!(type_arguments_within_path); |
295 | return true; | 294 | return true; |
296 | } | 295 | } |
297 | } | 296 | } |