Revise TypeInfo::ty usage

This commit is contained in:
Lukas Wirth 2021-08-03 17:24:43 +02:00
parent 25ff7171c4
commit 8afa2722b2
18 changed files with 30 additions and 29 deletions

View file

@ -543,7 +543,7 @@ impl ImportCandidate {
match sema.resolve_method_call(method_call) {
Some(_) => None,
None => Some(Self::TraitMethod(TraitImportCandidate {
receiver_ty: sema.type_of_expr(&method_call.receiver()?)?.ty,
receiver_ty: sema.type_of_expr(&method_call.receiver()?)?.coerced(),
assoc_item_name: NameToImport::Exact(method_call.name_ref()?.to_string()),
})),
}