diff options
Diffstat (limited to 'crates/ide_ssr/src/search.rs')
-rw-r--r-- | crates/ide_ssr/src/search.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/crates/ide_ssr/src/search.rs b/crates/ide_ssr/src/search.rs index 836eb94b2..28cef742c 100644 --- a/crates/ide_ssr/src/search.rs +++ b/crates/ide_ssr/src/search.rs | |||
@@ -12,7 +12,6 @@ use ide_db::{ | |||
12 | }; | 12 | }; |
13 | use rustc_hash::FxHashSet; | 13 | use rustc_hash::FxHashSet; |
14 | use syntax::{ast, AstNode, SyntaxKind, SyntaxNode}; | 14 | use syntax::{ast, AstNode, SyntaxKind, SyntaxNode}; |
15 | use test_utils::mark; | ||
16 | 15 | ||
17 | /// A cache for the results of find_usages. This is for when we have multiple patterns that have the | 16 | /// A cache for the results of find_usages. This is for when we have multiple patterns that have the |
18 | /// same path. e.g. if the pattern was `foo::Bar` that can parse as a path, an expression, a type | 17 | /// same path. e.g. if the pattern was `foo::Bar` that can parse as a path, an expression, a type |
@@ -61,7 +60,7 @@ impl<'db> MatchFinder<'db> { | |||
61 | for file_range in self.find_usages(usage_cache, definition).file_ranges() { | 60 | for file_range in self.find_usages(usage_cache, definition).file_ranges() { |
62 | if let Some(node_to_match) = self.find_node_to_match(resolved_path, file_range) { | 61 | if let Some(node_to_match) = self.find_node_to_match(resolved_path, file_range) { |
63 | if !is_search_permitted_ancestors(&node_to_match) { | 62 | if !is_search_permitted_ancestors(&node_to_match) { |
64 | mark::hit!(use_declaration_with_braces); | 63 | cov_mark::hit!(use_declaration_with_braces); |
65 | continue; | 64 | continue; |
66 | } | 65 | } |
67 | self.try_add_match(rule, &node_to_match, &None, matches_out); | 66 | self.try_add_match(rule, &node_to_match, &None, matches_out); |
@@ -205,7 +204,7 @@ impl<'db> MatchFinder<'db> { | |||
205 | matches_out: &mut Vec<Match>, | 204 | matches_out: &mut Vec<Match>, |
206 | ) { | 205 | ) { |
207 | if !self.within_range_restrictions(code) { | 206 | if !self.within_range_restrictions(code) { |
208 | mark::hit!(replace_nonpath_within_selection); | 207 | cov_mark::hit!(replace_nonpath_within_selection); |
209 | return; | 208 | return; |
210 | } | 209 | } |
211 | if let Ok(m) = matching::get_match(false, rule, code, restrict_range, &self.sema) { | 210 | if let Ok(m) = matching::get_match(false, rule, code, restrict_range, &self.sema) { |