aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide/src/parent_module.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_ide/src/parent_module.rs')
-rw-r--r--crates/ra_ide/src/parent_module.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/crates/ra_ide/src/parent_module.rs b/crates/ra_ide/src/parent_module.rs
index aaf4460df..a083fb1eb 100644
--- a/crates/ra_ide/src/parent_module.rs
+++ b/crates/ra_ide/src/parent_module.rs
@@ -7,7 +7,7 @@ use ra_syntax::{
7 algo::find_node_at_offset, 7 algo::find_node_at_offset,
8 ast::{self, AstNode}, 8 ast::{self, AstNode},
9}; 9};
10use test_utils::tested_by; 10use test_utils::mark;
11 11
12use crate::NavigationTarget; 12use crate::NavigationTarget;
13 13
@@ -25,7 +25,7 @@ pub(crate) fn parent_module(db: &RootDatabase, position: FilePosition) -> Vec<Na
25 .item_list() 25 .item_list()
26 .map_or(false, |it| it.syntax().text_range().contains_inclusive(position.offset)) 26 .map_or(false, |it| it.syntax().text_range().contains_inclusive(position.offset))
27 { 27 {
28 tested_by!(test_resolve_parent_module_on_module_decl); 28 mark::hit!(test_resolve_parent_module_on_module_decl);
29 module = m.syntax().ancestors().skip(1).find_map(ast::Module::cast); 29 module = m.syntax().ancestors().skip(1).find_map(ast::Module::cast);
30 } 30 }
31 } 31 }
@@ -57,7 +57,7 @@ pub(crate) fn crate_for(db: &RootDatabase, file_id: FileId) -> Vec<CrateId> {
57mod tests { 57mod tests {
58 use ra_cfg::CfgOptions; 58 use ra_cfg::CfgOptions;
59 use ra_db::Env; 59 use ra_db::Env;
60 use test_utils::covers; 60 use test_utils::mark;
61 61
62 use crate::{ 62 use crate::{
63 mock_analysis::{analysis_and_position, MockAnalysis}, 63 mock_analysis::{analysis_and_position, MockAnalysis},
@@ -81,7 +81,7 @@ mod tests {
81 81
82 #[test] 82 #[test]
83 fn test_resolve_parent_module_on_module_decl() { 83 fn test_resolve_parent_module_on_module_decl() {
84 covers!(test_resolve_parent_module_on_module_decl); 84 mark::check!(test_resolve_parent_module_on_module_decl);
85 let (analysis, pos) = analysis_and_position( 85 let (analysis, pos) = analysis_and_position(
86 " 86 "
87 //- /lib.rs 87 //- /lib.rs