mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 20:42:04 +00:00
fix: Fix general find-path inconsistencies
This commit is contained in:
parent
21ec8f5238
commit
c88b421853
32 changed files with 242 additions and 193 deletions
|
@ -308,7 +308,7 @@ impl Ctx<'_> {
|
|||
parent.segment()?.name_ref()?,
|
||||
)
|
||||
.and_then(|trait_ref| {
|
||||
let found_path = self.target_module.find_use_path(
|
||||
let found_path = self.target_module.find_path(
|
||||
self.source_scope.db.upcast(),
|
||||
hir::ModuleDef::Trait(trait_ref),
|
||||
false,
|
||||
|
@ -347,7 +347,7 @@ impl Ctx<'_> {
|
|||
}
|
||||
}
|
||||
|
||||
let found_path = self.target_module.find_use_path(
|
||||
let found_path = self.target_module.find_path(
|
||||
self.source_scope.db.upcast(),
|
||||
def,
|
||||
false,
|
||||
|
@ -385,7 +385,7 @@ impl Ctx<'_> {
|
|||
|
||||
if let Some(adt) = ty.as_adt() {
|
||||
if let ast::Type::PathType(path_ty) = &ast_ty {
|
||||
let found_path = self.target_module.find_use_path(
|
||||
let found_path = self.target_module.find_path(
|
||||
self.source_scope.db.upcast(),
|
||||
ModuleDef::from(adt),
|
||||
false,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue