Don't ICE for kind mismatches during error rendering
This commit is contained in:
parent
4f75d67b6f
commit
0a88339a57
3 changed files with 66 additions and 0 deletions
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue