Skip to content

Commit

Permalink
Fix mir pass ICE in the presence of other errors
Browse files Browse the repository at this point in the history
  • Loading branch information
oli-obk committed Feb 8, 2024
1 parent 6af2d3c commit 7dc182d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions compiler/rustc_mir_transform/src/abort_unwinding_calls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 7dc182d

Please sign in to comment.