This interface is not respecting the coercion api commit is always false,
we need to ensure this is respected via the try flag like the rest of the
coercion logic.
gcc/rust/ChangeLog:
* typecheck/rust-coercion.cc (TypeCoercionRules::select): respect try flag
Signed-off-by: Philip Herron <herron.philip@googlemail.com>
= unify_site_and (autoderefed.get_ref (), TyTy::TyWithLocation (expected),
TyTy::TyWithLocation (&autoderefed),
UNDEF_LOCATION /* locus */, false /*emit_errors*/,
- false /*commit_if_ok*/, true /*infer*/, true /*cleanup*/);
+ !try_flag /*commit_if_ok*/, try_flag /*infer*/,
+ try_flag /*cleanup*/);
bool ok = result->get_kind () != TyTy::TypeKind::ERROR;
if (!ok)
return false;