1
Fork 0

don't ICE on higher ranked hidden types

This commit is contained in:
Ali MJ Al-Nasrawy 2023-07-11 14:24:08 +00:00 committed by Oli Scherer
parent 4f7bb9890c
commit d55522aad8
7 changed files with 109 additions and 11 deletions

View file

@ -351,6 +351,15 @@ pub fn unexpected_hidden_region_diagnostic<'tcx>(
)
}
}
ty::RePlaceholder(_) => {
explain_free_region(
tcx,
&mut err,
&format!("hidden type `{}` captures ", hidden_ty),
hidden_region,
"",
);
}
ty::ReError(_) => {
err.delay_as_bug();
}