Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir-ty/src/method_resolution/confirm.rs')
| -rw-r--r-- | crates/hir-ty/src/method_resolution/confirm.rs | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/crates/hir-ty/src/method_resolution/confirm.rs b/crates/hir-ty/src/method_resolution/confirm.rs index 6601ff7a01..821d737cf9 100644 --- a/crates/hir-ty/src/method_resolution/confirm.rs +++ b/crates/hir-ty/src/method_resolution/confirm.rs @@ -18,7 +18,7 @@ use crate::{ Adjust, Adjustment, AutoBorrow, IncorrectGenericsLenKind, InferenceDiagnostic, LifetimeElisionKind, PointerCast, Span, db::HirDatabase, - infer::{AllowTwoPhase, AutoBorrowMutability, InferenceContext, TypeMismatch}, + infer::{AllowTwoPhase, AutoBorrowMutability, InferenceContext}, lower::{ GenericPredicates, path::{GenericArgsLowerer, TypeLikeConst, substs_from_args_and_bindings}, @@ -492,10 +492,7 @@ impl<'a, 'b, 'db> ConfirmContext<'a, 'b, 'db> { } Err(_) => { if self.ctx.features.arbitrary_self_types { - self.ctx.result.type_mismatches.get_or_insert_default().insert( - self.call_expr.into(), - TypeMismatch { expected: method_self_ty.store(), actual: self_ty.store() }, - ); + self.ctx.emit_type_mismatch(self.call_expr.into(), method_self_ty, self_ty); } } } |