⬆️ rust-analyzer

This commit is contained in:
Laurențiu Nicola 2022-09-20 17:39:17 +03:00
parent 459bbb4222
commit f5fde4df43
76 changed files with 1613 additions and 654 deletions

View file

@ -173,6 +173,7 @@ impl<'a> Ctx<'a> {
let found_path = self.target_module.find_use_path(
self.source_scope.db.upcast(),
hir::ModuleDef::Trait(trait_ref),
false,
)?;
match ast::make::ty_path(mod_path_to_ast(&found_path)) {
ast::Type::PathType(path_ty) => Some(path_ty),
@ -209,7 +210,7 @@ impl<'a> Ctx<'a> {
}
let found_path =
self.target_module.find_use_path(self.source_scope.db.upcast(), def)?;
self.target_module.find_use_path(self.source_scope.db.upcast(), def, false)?;
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() {