Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide-db/src/path_transform.rs')
-rw-r--r--crates/ide-db/src/path_transform.rs9
1 files changed, 7 insertions, 2 deletions
diff --git a/crates/ide-db/src/path_transform.rs b/crates/ide-db/src/path_transform.rs
index fb75b5b458..fa9339f30f 100644
--- a/crates/ide-db/src/path_transform.rs
+++ b/crates/ide-db/src/path_transform.rs
@@ -277,6 +277,7 @@ impl Ctx<'_> {
self.source_scope.db.upcast(),
hir::ModuleDef::Trait(trait_ref),
false,
+ true,
)?;
match make::ty_path(mod_path_to_ast(&found_path)) {
ast::Type::PathType(path_ty) => Some(path_ty),
@@ -311,8 +312,12 @@ impl Ctx<'_> {
}
}
- let found_path =
- self.target_module.find_use_path(self.source_scope.db.upcast(), def, false)?;
+ let found_path = self.target_module.find_use_path(
+ self.source_scope.db.upcast(),
+ def,
+ false,
+ true,
+ )?;
let res = mod_path_to_ast(&found_path).clone_for_update();
if let Some(args) = path.segment().and_then(|it| it.generic_arg_list()) {
if let Some(segment) = res.segment() {