aboutsummaryrefslogtreecommitdiff
path: root/crates/ide
diff options
context:
space:
mode:
authorvsrs <[email protected]>2021-03-11 14:39:41 +0000
committervsrs <[email protected]>2021-03-11 14:39:41 +0000
commitdaa2637486755f012c738d3516ff7cb3d3dcd234 (patch)
tree7ee45f3bc3d89a90a709ae4076c0eec74717b262 /crates/ide
parentf234b80520ed63b168475be38086d053567f4c1e (diff)
Apply review suggestions
Diffstat (limited to 'crates/ide')
-rw-r--r--crates/ide/src/runnables.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/crates/ide/src/runnables.rs b/crates/ide/src/runnables.rs
index 7c92b7625..d8cf66168 100644
--- a/crates/ide/src/runnables.rs
+++ b/crates/ide/src/runnables.rs
@@ -5,7 +5,10 @@ use cfg::CfgExpr;
5use hir::{AsAssocItem, HasAttrs, HasSource, Semantics}; 5use hir::{AsAssocItem, HasAttrs, HasSource, Semantics};
6use ide_assists::utils::test_related_attribute; 6use ide_assists::utils::test_related_attribute;
7use ide_db::{ 7use ide_db::{
8 base_db::FilePosition, defs::Definition, search::SearchScope, RootDatabase, SymbolKind, 8 base_db::{FilePosition, FileRange},
9 defs::Definition,
10 search::SearchScope,
11 RootDatabase, SymbolKind,
9}; 12};
10use itertools::Itertools; 13use itertools::Itertools;
11use rustc_hash::FxHashSet; 14use rustc_hash::FxHashSet;
@@ -168,7 +171,7 @@ fn find_related_tests_in_module(
168 }; 171 };
169 172
170 let file_id = mod_source.file_id.original_file(sema.db); 173 let file_id = mod_source.file_id.original_file(sema.db);
171 let mod_scope = SearchScope::file_part(file_id, range); 174 let mod_scope = SearchScope::file_range(FileRange { file_id, range });
172 let fn_pos = FilePosition { file_id, offset: fn_name.syntax().text_range().start() }; 175 let fn_pos = FilePosition { file_id, offset: fn_name.syntax().text_range().start() };
173 find_related_tests(sema, fn_pos, Some(mod_scope), tests) 176 find_related_tests(sema, fn_pos, Some(mod_scope), tests)
174 } 177 }