diff options
author | Aleksey Kladov <[email protected]> | 2019-11-24 10:34:27 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2019-11-24 10:34:27 +0000 |
commit | f0e0a40a6106e979843f97001bb3db59ceb29557 (patch) | |
tree | 0873d73c54620163b6695365753128b67faf0e02 /crates/ra_hir_def/src | |
parent | ea3124c12a52f28163a6375b6a5e3c79fc14312d (diff) |
Reduce visbility
Diffstat (limited to 'crates/ra_hir_def/src')
-rw-r--r-- | crates/ra_hir_def/src/nameres.rs | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/crates/ra_hir_def/src/nameres.rs b/crates/ra_hir_def/src/nameres.rs index 3b2e99647..68a0451a2 100644 --- a/crates/ra_hir_def/src/nameres.rs +++ b/crates/ra_hir_def/src/nameres.rs | |||
@@ -267,16 +267,6 @@ impl CrateDefMap { | |||
267 | self.diagnostics.iter().for_each(|it| it.add_to(db, module, sink)) | 267 | self.diagnostics.iter().for_each(|it| it.add_to(db, module, sink)) |
268 | } | 268 | } |
269 | 269 | ||
270 | pub fn resolve_path( | ||
271 | &self, | ||
272 | db: &impl DefDatabase, | ||
273 | original_module: LocalModuleId, | ||
274 | path: &Path, | ||
275 | ) -> (PerNs, Option<usize>) { | ||
276 | let res = self.resolve_path_fp_with_macro(db, ResolveMode::Other, original_module, path); | ||
277 | (res.resolved_def, res.segment_index) | ||
278 | } | ||
279 | |||
280 | pub fn modules(&self) -> impl Iterator<Item = LocalModuleId> + '_ { | 270 | pub fn modules(&self) -> impl Iterator<Item = LocalModuleId> + '_ { |
281 | self.modules.iter().map(|(id, _data)| id) | 271 | self.modules.iter().map(|(id, _data)| id) |
282 | } | 272 | } |
@@ -287,6 +277,16 @@ impl CrateDefMap { | |||
287 | .filter(move |(_id, data)| data.definition == Some(file_id)) | 277 | .filter(move |(_id, data)| data.definition == Some(file_id)) |
288 | .map(|(id, _data)| id) | 278 | .map(|(id, _data)| id) |
289 | } | 279 | } |
280 | |||
281 | pub(crate) fn resolve_path( | ||
282 | &self, | ||
283 | db: &impl DefDatabase, | ||
284 | original_module: LocalModuleId, | ||
285 | path: &Path, | ||
286 | ) -> (PerNs, Option<usize>) { | ||
287 | let res = self.resolve_path_fp_with_macro(db, ResolveMode::Other, original_module, path); | ||
288 | (res.resolved_def, res.segment_index) | ||
289 | } | ||
290 | } | 290 | } |
291 | 291 | ||
292 | impl ModuleData { | 292 | impl ModuleData { |