diff options
author | Hasan Ali <[email protected]> | 2020-05-15 22:23:49 +0100 |
---|---|---|
committer | Hasan Ali <[email protected]> | 2020-05-16 01:09:04 +0100 |
commit | 001a86dc03104b75df732d69257d22526cf422b7 (patch) | |
tree | 4f1554da3d909c15d5e4cec7c8470687cf452467 /crates/ra_hir/src/semantics.rs | |
parent | cffa70be01d4353184f874fc4768b692e255dd30 (diff) |
Fix completion and hover for module and function of same name
Diffstat (limited to 'crates/ra_hir/src/semantics.rs')
-rw-r--r-- | crates/ra_hir/src/semantics.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/crates/ra_hir/src/semantics.rs b/crates/ra_hir/src/semantics.rs index 515e5eb17..c1129a494 100644 --- a/crates/ra_hir/src/semantics.rs +++ b/crates/ra_hir/src/semantics.rs | |||
@@ -23,7 +23,7 @@ use crate::{ | |||
23 | db::HirDatabase, | 23 | db::HirDatabase, |
24 | diagnostics::Diagnostic, | 24 | diagnostics::Diagnostic, |
25 | semantics::source_to_def::{ChildContainer, SourceToDefCache, SourceToDefCtx}, | 25 | semantics::source_to_def::{ChildContainer, SourceToDefCache, SourceToDefCtx}, |
26 | source_analyzer::{resolve_hir_path, SourceAnalyzer}, | 26 | source_analyzer::{resolve_hir_path, resolve_hir_path_qualifier, SourceAnalyzer}, |
27 | AssocItem, Field, Function, HirFileId, ImplDef, InFile, Local, MacroDef, Module, ModuleDef, | 27 | AssocItem, Field, Function, HirFileId, ImplDef, InFile, Local, MacroDef, Module, ModuleDef, |
28 | Name, Origin, Path, ScopeDef, Trait, Type, TypeAlias, TypeParam, | 28 | Name, Origin, Path, ScopeDef, Trait, Type, TypeAlias, TypeParam, |
29 | }; | 29 | }; |
@@ -451,6 +451,10 @@ impl<'a, DB: HirDatabase> SemanticsScope<'a, DB> { | |||
451 | pub fn resolve_hir_path(&self, path: &Path) -> Option<PathResolution> { | 451 | pub fn resolve_hir_path(&self, path: &Path) -> Option<PathResolution> { |
452 | resolve_hir_path(self.db, &self.resolver, path) | 452 | resolve_hir_path(self.db, &self.resolver, path) |
453 | } | 453 | } |
454 | |||
455 | pub fn resolve_hir_path_qualifier(&self, path: &Path) -> Option<PathResolution> { | ||
456 | resolve_hir_path_qualifier(self.db, &self.resolver, path) | ||
457 | } | ||
454 | } | 458 | } |
455 | 459 | ||
456 | // FIXME: Change `HasSource` trait to work with `Semantics` and remove this? | 460 | // FIXME: Change `HasSource` trait to work with `Semantics` and remove this? |