aboutsummaryrefslogtreecommitdiff
path: root/crates/ide/src/runnables.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ide/src/runnables.rs')
-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 }