Fix mir pass ICE in the presence of other errors
This commit is contained in:
parent
6af2d3cc90
commit
7dc182d5d4
1 changed files with 1 additions and 0 deletions
|
@ -41,6 +41,7 @@ impl<'tcx> MirPass<'tcx> for AbortUnwindingCalls {
|
|||
ty::Closure(..) => Abi::RustCall,
|
||||
ty::CoroutineClosure(..) => Abi::RustCall,
|
||||
ty::Coroutine(..) => Abi::Rust,
|
||||
ty::Error(_) => return,
|
||||
_ => span_bug!(body.span, "unexpected body ty: {:?}", body_ty),
|
||||
};
|
||||
let body_can_unwind = layout::fn_can_unwind(tcx, Some(def_id), body_abi);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue