aboutsummaryrefslogtreecommitdiff
path: root/crates/ide/src/runnables.rs
diff options
context:
space:
mode:
authorLukas Wirth <[email protected]>2021-03-15 11:18:52 +0000
committerLukas Wirth <[email protected]>2021-03-15 11:18:52 +0000
commit41745f48d5f867ff0896ce7906b5b4c04e72a767 (patch)
tree8a70342d903be16b20c62f8800a59af368ffb012 /crates/ide/src/runnables.rs
parenta1c96e04be55b3412e5510fc8d09cd82675dd4cd (diff)
move Semantics::visit_file_defs to ide_db::helpers
Diffstat (limited to 'crates/ide/src/runnables.rs')
-rw-r--r--crates/ide/src/runnables.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/crates/ide/src/runnables.rs b/crates/ide/src/runnables.rs
index 17454f270..0c7a8fbf8 100644
--- a/crates/ide/src/runnables.rs
+++ b/crates/ide/src/runnables.rs
@@ -8,6 +8,7 @@ use ide_assists::utils::test_related_attribute;
8use ide_db::{ 8use ide_db::{
9 base_db::{FilePosition, FileRange}, 9 base_db::{FilePosition, FileRange},
10 defs::Definition, 10 defs::Definition,
11 helpers::visit_file_defs,
11 search::SearchScope, 12 search::SearchScope,
12 RootDatabase, SymbolKind, 13 RootDatabase, SymbolKind,
13}; 14};
@@ -105,7 +106,7 @@ pub(crate) fn runnables(db: &RootDatabase, file_id: FileId) -> Vec<Runnable> {
105 let sema = Semantics::new(db); 106 let sema = Semantics::new(db);
106 107
107 let mut res = Vec::new(); 108 let mut res = Vec::new();
108 sema.visit_file_defs(file_id, &mut |def| match def { 109 visit_file_defs(&sema, file_id, &mut |def| match def {
109 Either::Left(def) => { 110 Either::Left(def) => {
110 let runnable = match def { 111 let runnable = match def {
111 hir::ModuleDef::Module(it) => runnable_mod(&sema, it), 112 hir::ModuleDef::Module(it) => runnable_mod(&sema, it),