diff options
| author | bors <bors@rust-lang.org> | 2024-10-09 22:21:43 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-10-09 22:21:43 +0000 |
| commit | fc0f045dd1fe9b0f14f504d0513623342be6f0dc (patch) | |
| tree | b1d6965506ef363c4324af76028fab9d91aa9f2e /compiler/rustc_codegen_llvm/src/context.rs | |
| parent | eb4e2346748e1760f74fcaa27b42431e0b95f8f3 (diff) | |
| parent | 0fe2532a37b5a23f554cd3e64e2d6da1838ed451 (diff) | |
| download | rust-fc0f045dd1fe9b0f14f504d0513623342be6f0dc.tar.gz rust-fc0f045dd1fe9b0f14f504d0513623342be6f0dc.zip | |
Auto merge of #131458 - matthiaskrgr:rollup-82qeotv, r=matthiaskrgr
Rollup of 7 pull requests Successful merges: - #131382 (Add "reference" as a known compiletest header) - #131420 (Dont ICE when encountering post-mono layout cycle error) - #131424 (compiler: Stop reexporting enum-globs from `rustc_target::abi`) - #131426 (Fix quotation marks around debug line in `src/ci/run.sh`) - #131435 (Ignore broken-pipe-no-ice on apple (specifically macOS) for now) - #131447 (add more crash tests) - #131456 (Fix typo in E0793) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/context.rs')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/context.rs | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/compiler/rustc_codegen_llvm/src/context.rs b/compiler/rustc_codegen_llvm/src/context.rs index 81b82840472..0a116971e07 100644 --- a/compiler/rustc_codegen_llvm/src/context.rs +++ b/compiler/rustc_codegen_llvm/src/context.rs @@ -1187,10 +1187,11 @@ impl<'tcx> FnAbiOfHelpers<'tcx> for CodegenCx<'_, 'tcx> { span: Span, fn_abi_request: FnAbiRequest<'tcx>, ) -> ! { - if let FnAbiError::Layout(LayoutError::SizeOverflow(_)) = err { - self.tcx.dcx().emit_fatal(Spanned { span, node: err }) - } else { - match fn_abi_request { + match err { + FnAbiError::Layout(LayoutError::SizeOverflow(_) | LayoutError::Cycle(_)) => { + self.tcx.dcx().emit_fatal(Spanned { span, node: err }); + } + _ => match fn_abi_request { FnAbiRequest::OfFnPtr { sig, extra_args } => { span_bug!(span, "`fn_abi_of_fn_ptr({sig}, {extra_args:?})` failed: {err:?}",); } @@ -1200,7 +1201,7 @@ impl<'tcx> FnAbiOfHelpers<'tcx> for CodegenCx<'_, 'tcx> { "`fn_abi_of_instance({instance}, {extra_args:?})` failed: {err:?}", ); } - } + }, } } } |
