From daa2637486755f012c738d3516ff7cb3d3dcd234 Mon Sep 17 00:00:00 2001 From: vsrs Date: Thu, 11 Mar 2021 17:39:41 +0300 Subject: Apply review suggestions --- crates/ide/src/runnables.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'crates/ide/src') 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; use hir::{AsAssocItem, HasAttrs, HasSource, Semantics}; use ide_assists::utils::test_related_attribute; use ide_db::{ - base_db::FilePosition, defs::Definition, search::SearchScope, RootDatabase, SymbolKind, + base_db::{FilePosition, FileRange}, + defs::Definition, + search::SearchScope, + RootDatabase, SymbolKind, }; use itertools::Itertools; use rustc_hash::FxHashSet; @@ -168,7 +171,7 @@ fn find_related_tests_in_module( }; let file_id = mod_source.file_id.original_file(sema.db); - let mod_scope = SearchScope::file_part(file_id, range); + let mod_scope = SearchScope::file_range(FileRange { file_id, range }); let fn_pos = FilePosition { file_id, offset: fn_name.syntax().text_range().start() }; find_related_tests(sema, fn_pos, Some(mod_scope), tests) } -- cgit v1.2.3