aboutsummaryrefslogtreecommitdiff
path: root/crates/libanalysis/src
diff options
context:
space:
mode:
Diffstat (limited to 'crates/libanalysis/src')
-rw-r--r--crates/libanalysis/src/imp.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/crates/libanalysis/src/imp.rs b/crates/libanalysis/src/imp.rs
index 50855551e..e3ccffbf0 100644
--- a/crates/libanalysis/src/imp.rs
+++ b/crates/libanalysis/src/imp.rs
@@ -113,13 +113,14 @@ impl AnalysisImpl {
113 113
114 } 114 }
115 pub fn parent_module(&self, file_id: FileId) -> Vec<(FileId, FileSymbol)> { 115 pub fn parent_module(&self, file_id: FileId) -> Vec<(FileId, FileSymbol)> {
116 let module_map = self.root(file_id).module_map(); 116 let root = self.root(file_id);
117 let module_map = root.module_map();
117 let id = module_map.file2module(file_id); 118 let id = module_map.file2module(file_id);
118 module_map 119 module_map
119 .parent_modules( 120 .parent_modules(
120 id, 121 id,
121 &*self.file_resolver, 122 &*self.file_resolver,
122 &|file_id| self.file_syntax(file_id), 123 &|file_id| root.syntax(file_id),
123 ) 124 )
124 .into_iter() 125 .into_iter()
125 .map(|(id, name, node)| { 126 .map(|(id, name, node)| {