Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide/src/lib.rs')
| -rw-r--r-- | crates/ide/src/lib.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/crates/ide/src/lib.rs b/crates/ide/src/lib.rs index 13b161e59d..a517dd0381 100644 --- a/crates/ide/src/lib.rs +++ b/crates/ide/src/lib.rs @@ -20,6 +20,7 @@ mod navigation_target; mod annotations; mod call_hierarchy; +mod children_modules; mod doc_links; mod expand_macro; mod extend_selection; @@ -605,6 +606,11 @@ impl Analysis { self.with_db(|db| parent_module::parent_module(db, position)) } + /// Returns vec of `mod name;` declaration which are created by the current module. + pub fn children_modules(&self, position: FilePosition) -> Cancellable<Vec<NavigationTarget>> { + self.with_db(|db| children_modules::children_modules(db, position)) + } + /// Returns crates that this file belongs to. pub fn crates_for(&self, file_id: FileId) -> Cancellable<Vec<Crate>> { self.with_db(|db| parent_module::crates_for(db, file_id)) |