Don't ice in validation when error body is created
This commit is contained in:
parent
698a3c7ade
commit
e32c1ddc52
3 changed files with 20 additions and 0 deletions
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue