diff options
Diffstat (limited to 'crates/ra_hir/src/nameres.rs')
-rw-r--r-- | crates/ra_hir/src/nameres.rs | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/crates/ra_hir/src/nameres.rs b/crates/ra_hir/src/nameres.rs index 8c8494b46..0046dfebf 100644 --- a/crates/ra_hir/src/nameres.rs +++ b/crates/ra_hir/src/nameres.rs | |||
@@ -297,7 +297,7 @@ where | |||
297 | }; | 297 | }; |
298 | let (def_id, reached_fixedpoint) = | 298 | let (def_id, reached_fixedpoint) = |
299 | self.result | 299 | self.result |
300 | .resolve_path(self.db, original_module, &import.path); | 300 | .resolve_path_fp(self.db, original_module, &import.path); |
301 | 301 | ||
302 | if reached_fixedpoint == ReachedFixedPoint::Yes { | 302 | if reached_fixedpoint == ReachedFixedPoint::Yes { |
303 | let last_segment = import.path.segments.last().unwrap(); | 303 | let last_segment = import.path.segments.last().unwrap(); |
@@ -331,10 +331,19 @@ enum ReachedFixedPoint { | |||
331 | } | 331 | } |
332 | 332 | ||
333 | impl ItemMap { | 333 | impl ItemMap { |
334 | pub(crate) fn resolve_path( | ||
335 | &self, | ||
336 | db: &impl HirDatabase, | ||
337 | original_module: Module, | ||
338 | path: &Path, | ||
339 | ) -> PerNs<ModuleDef> { | ||
340 | self.resolve_path_fp(db, original_module, path).0 | ||
341 | } | ||
342 | |||
334 | // returns true if we are sure that additions to `ItemMap` wouldn't change | 343 | // returns true if we are sure that additions to `ItemMap` wouldn't change |
335 | // the result. That is, if we've reached fixed point at this particular | 344 | // the result. That is, if we've reached fixed point at this particular |
336 | // import. | 345 | // import. |
337 | fn resolve_path( | 346 | fn resolve_path_fp( |
338 | &self, | 347 | &self, |
339 | db: &impl HirDatabase, | 348 | db: &impl HirDatabase, |
340 | original_module: Module, | 349 | original_module: Module, |