// the type correctly as our receiver may be generic and we are inferring its
// generic arguments and this Self might be the concrete version or vice
// versa.
- auto result = unify_site (get_impl_block ()->get_mappings ().get_hirid (),
- TyTy::TyWithLocation (receiver),
- TyTy::TyWithLocation (impl_self_infer),
- impl_predicate.get_locus ());
+ auto result = unify_site_and (get_impl_block ()->get_mappings ().get_hirid (),
+ TyTy::TyWithLocation (receiver),
+ TyTy::TyWithLocation (impl_self_infer),
+ impl_predicate.get_locus (),
+ true /*emit-errors*/, true /*commit-if-ok*/,
+ true /*infer*/, true /*cleanup-on-fail*/);
rust_assert (result->get_kind () != TyTy::TypeKind::ERROR);
TyTy::BaseType *self_result = result;
TyTy::BaseType *b = hrtb_bound_arguments.at (i);
result
- = unify_site (a->get_ref (), TyTy::TyWithLocation (a),
- TyTy::TyWithLocation (b), impl_predicate.get_locus ());
+ = unify_site_and (a->get_ref (), TyTy::TyWithLocation (a),
+ TyTy::TyWithLocation (b), impl_predicate.get_locus (),
+ true /*emit-errors*/, true /*commit-if-ok*/,
+ true /*infer*/, true /*cleanup-on-fail*/);
rust_assert (result->get_kind () != TyTy::TypeKind::ERROR);
}