mirror of
https://github.com/rust-lang/rust-analyzer
synced 2025-01-14 06:03:58 +00:00
Merge #5717
5717: Minor
r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
This commit is contained in:
commit
d0fd8eb7f6
1 changed files with 3 additions and 4 deletions
|
@ -265,8 +265,7 @@ impl SourceAnalyzer {
|
||||||
}
|
}
|
||||||
|
|
||||||
// This must be a normal source file rather than macro file.
|
// This must be a normal source file rather than macro file.
|
||||||
let hir_path =
|
let hir_path = Path::from_src(path.clone(), &Hygiene::new(db.upcast(), self.file_id))?;
|
||||||
crate::Path::from_src(path.clone(), &Hygiene::new(db.upcast(), self.file_id))?;
|
|
||||||
|
|
||||||
// Case where path is a qualifier of another path, e.g. foo::bar::Baz where we
|
// Case where path is a qualifier of another path, e.g. foo::bar::Baz where we
|
||||||
// trying to resolve foo::bar.
|
// trying to resolve foo::bar.
|
||||||
|
@ -451,7 +450,7 @@ fn adjust(
|
||||||
pub(crate) fn resolve_hir_path(
|
pub(crate) fn resolve_hir_path(
|
||||||
db: &dyn HirDatabase,
|
db: &dyn HirDatabase,
|
||||||
resolver: &Resolver,
|
resolver: &Resolver,
|
||||||
path: &crate::Path,
|
path: &Path,
|
||||||
) -> Option<PathResolution> {
|
) -> Option<PathResolution> {
|
||||||
let types =
|
let types =
|
||||||
resolver.resolve_path_in_type_ns_fully(db.upcast(), path.mod_path()).map(|ty| match ty {
|
resolver.resolve_path_in_type_ns_fully(db.upcast(), path.mod_path()).map(|ty| match ty {
|
||||||
|
@ -512,7 +511,7 @@ pub(crate) fn resolve_hir_path(
|
||||||
pub(crate) fn resolve_hir_path_qualifier(
|
pub(crate) fn resolve_hir_path_qualifier(
|
||||||
db: &dyn HirDatabase,
|
db: &dyn HirDatabase,
|
||||||
resolver: &Resolver,
|
resolver: &Resolver,
|
||||||
path: &crate::Path,
|
path: &Path,
|
||||||
) -> Option<PathResolution> {
|
) -> Option<PathResolution> {
|
||||||
let items = resolver
|
let items = resolver
|
||||||
.resolve_module_path_in_items(db.upcast(), path.mod_path())
|
.resolve_module_path_in_items(db.upcast(), path.mod_path())
|
||||||
|
|
Loading…
Reference in a new issue