diff options
| author | Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de> | 2024-02-08 14:49:27 +0000 |
|---|---|---|
| committer | Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de> | 2024-02-08 14:49:27 +0000 |
| commit | 7dc182d5d405a08ecdb4d652e10c6b6f183d61e7 (patch) | |
| tree | c5c01a93f89aca5d4ba38317a603b9dd0461fcb9 /compiler/rustc_mir_transform/src | |
| parent | 6af2d3cc90f7625ad3db4687a93abebfa9e8396a (diff) | |
| download | rust-7dc182d5d405a08ecdb4d652e10c6b6f183d61e7.tar.gz rust-7dc182d5d405a08ecdb4d652e10c6b6f183d61e7.zip | |
Fix mir pass ICE in the presence of other errors
Diffstat (limited to 'compiler/rustc_mir_transform/src')
| -rw-r--r-- | compiler/rustc_mir_transform/src/abort_unwinding_calls.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler/rustc_mir_transform/src/abort_unwinding_calls.rs b/compiler/rustc_mir_transform/src/abort_unwinding_calls.rs index 451d3be255f..ba70a4453d6 100644 --- a/compiler/rustc_mir_transform/src/abort_unwinding_calls.rs +++ b/compiler/rustc_mir_transform/src/abort_unwinding_calls.rs @@ -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); |
