aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide_api/src/runnables.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_ide_api/src/runnables.rs')
-rw-r--r--crates/ra_ide_api/src/runnables.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_ide_api/src/runnables.rs b/crates/ra_ide_api/src/runnables.rs
index 200958434..07412a9ef 100644
--- a/crates/ra_ide_api/src/runnables.rs
+++ b/crates/ra_ide_api/src/runnables.rs
@@ -47,7 +47,7 @@ fn runnable_fn(fn_def: ast::FnDef) -> Option<Runnable> {
47 } else { 47 } else {
48 return None; 48 return None;
49 }; 49 };
50 Some(Runnable { range: fn_def.syntax().range(), kind }) 50 Some(Runnable { range: fn_def.syntax().text_range(), kind })
51} 51}
52 52
53fn runnable_mod(db: &RootDatabase, file_id: FileId, module: ast::Module) -> Option<Runnable> { 53fn runnable_mod(db: &RootDatabase, file_id: FileId, module: ast::Module) -> Option<Runnable> {
@@ -62,7 +62,7 @@ fn runnable_mod(db: &RootDatabase, file_id: FileId, module: ast::Module) -> Opti
62 if !has_test_function { 62 if !has_test_function {
63 return None; 63 return None;
64 } 64 }
65 let range = module.syntax().range(); 65 let range = module.syntax().text_range();
66 let module = hir::source_binder::module_from_child_node(db, file_id, module.syntax())?; 66 let module = hir::source_binder::module_from_child_node(db, file_id, module.syntax())?;
67 67
68 let path = module.path_to_root(db).into_iter().rev().filter_map(|it| it.name(db)).join("::"); 68 let path = module.path_to_root(db).into_iter().rev().filter_map(|it| it.name(db)).join("::");