1
Fork 0

Rollup merge of #120817 - compiler-errors:more-mir-errors, r=oli-obk

Fix more `ty::Error` ICEs in MIR passes

Fixes #120791 - Add a check for `ty::Error` in the `ByMove` coroutine pass
Fixes #120816 - Add a check for `ty::Error` in the MIR validator

Also a drive-by fix for a FIXME I had asked oli to add

r? oli-obk
This commit is contained in:
Matthias Krüger 2024-02-09 14:41:51 +01:00 committed by GitHub
commit 116efb5bb1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 73 additions and 12 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)
}