1
Fork 0

Don't ice in validation when error body is created

This commit is contained in:
Michael Goulet 2024-02-09 00:40:43 +00:00
parent 698a3c7ade
commit e32c1ddc52
3 changed files with 20 additions and 0 deletions

View file

@ -60,6 +60,8 @@ impl<'tcx> MirPass<'tcx> for Validator {
ty::Closure(..) => Abi::RustCall,
ty::CoroutineClosure(..) => Abi::RustCall,
ty::Coroutine(..) => Abi::Rust,
// No need to do MIR validation on error bodies
ty::Error(_) => return,
_ => {
span_bug!(body.span, "unexpected body ty: {:?} phase {:?}", body_ty, mir_phase)
}