mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 05:15:04 +00:00
Fix completion and hover for module and function of same name
This commit is contained in:
parent
cffa70be01
commit
001a86dc03
4 changed files with 102 additions and 2 deletions
|
@ -23,7 +23,7 @@ use crate::{
|
|||
db::HirDatabase,
|
||||
diagnostics::Diagnostic,
|
||||
semantics::source_to_def::{ChildContainer, SourceToDefCache, SourceToDefCtx},
|
||||
source_analyzer::{resolve_hir_path, SourceAnalyzer},
|
||||
source_analyzer::{resolve_hir_path, resolve_hir_path_qualifier, SourceAnalyzer},
|
||||
AssocItem, Field, Function, HirFileId, ImplDef, InFile, Local, MacroDef, Module, ModuleDef,
|
||||
Name, Origin, Path, ScopeDef, Trait, Type, TypeAlias, TypeParam,
|
||||
};
|
||||
|
@ -451,6 +451,10 @@ impl<'a, DB: HirDatabase> SemanticsScope<'a, DB> {
|
|||
pub fn resolve_hir_path(&self, path: &Path) -> Option<PathResolution> {
|
||||
resolve_hir_path(self.db, &self.resolver, path)
|
||||
}
|
||||
|
||||
pub fn resolve_hir_path_qualifier(&self, path: &Path) -> Option<PathResolution> {
|
||||
resolve_hir_path_qualifier(self.db, &self.resolver, path)
|
||||
}
|
||||
}
|
||||
|
||||
// FIXME: Change `HasSource` trait to work with `Semantics` and remove this?
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue