Fix mir pass ICE in the presence of other errors
This commit is contained in:
parent
6af2d3cc90
commit
7dc182d5d4
@ -41,6 +41,7 @@ fn run_pass(&self, tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) {
|
||||
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…
Reference in New Issue
Block a user