diff options
Diffstat (limited to 'crates/libanalysis/src/imp.rs')
-rw-r--r-- | crates/libanalysis/src/imp.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/crates/libanalysis/src/imp.rs b/crates/libanalysis/src/imp.rs index f1d72da15..b80ce1ab5 100644 --- a/crates/libanalysis/src/imp.rs +++ b/crates/libanalysis/src/imp.rs | |||
@@ -151,7 +151,7 @@ impl AnalysisImpl { | |||
151 | .collect() | 151 | .collect() |
152 | } | 152 | } |
153 | 153 | ||
154 | pub fn crate_root(&self, id: FileId) -> Vec<CrateId> { | 154 | pub fn crate_for(&self, id: FileId) -> Vec<CrateId> { |
155 | let module_map = &self.data.module_map; | 155 | let module_map = &self.data.module_map; |
156 | let crate_graph = &self.data.crate_graph; | 156 | let crate_graph = &self.data.crate_graph; |
157 | let mut res = Vec::new(); | 157 | let mut res = Vec::new(); |
@@ -177,7 +177,9 @@ impl AnalysisImpl { | |||
177 | } | 177 | } |
178 | res | 178 | res |
179 | } | 179 | } |
180 | 180 | pub fn crate_root(&self, crate_id: CrateId) -> FileId { | |
181 | self.data.crate_graph.crate_roots[&crate_id] | ||
182 | } | ||
181 | pub fn approximately_resolve_symbol( | 183 | pub fn approximately_resolve_symbol( |
182 | &self, | 184 | &self, |
183 | id: FileId, | 185 | id: FileId, |