1
Fork 0

Don't ICE for kind mismatches during error rendering

This commit is contained in:
Oli Scherer 2024-04-09 10:08:20 +00:00
parent 4f75d67b6f
commit 0a88339a57
3 changed files with 66 additions and 0 deletions

View file

@ -1974,6 +1974,9 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
for (obligation_arg, impl_arg) in
std::iter::zip(obligation_trait_ref.args, impl_trait_ref.args)
{
if (obligation_arg, impl_arg).references_error() {
return false;
}
if let Err(terr) =
ocx.eq(&ObligationCause::dummy(), param_env, impl_arg, obligation_arg)
{