about summary refs log tree commit diff
path: root/compiler/rustc_codegen_gcc
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2025-02-11 18:04:44 +0100
committerGitHub <noreply@github.com>2025-02-11 18:04:44 +0100
commit8ade6baa12a0a7d88738c2d9552d64aad9871512 (patch)
tree8fc797f97d06e86f24487364bb413f186a0eb222 /compiler/rustc_codegen_gcc
parent2cb21fb0151c339e9962ac398e37d7e6af7a7b24 (diff)
parentfd58652a7de3c04ca957dd8fdc580c16ad17a8d3 (diff)
downloadrust-8ade6baa12a0a7d88738c2d9552d64aad9871512.tar.gz
rust-8ade6baa12a0a7d88738c2d9552d64aad9871512.zip
Rollup merge of #136833 - workingjubilee:let-the-impossible-be-impossible, r=compiler-errors
compiler: die immediately instead of handling unknown target codegen

We cannot produce anything useful if asked to compile unknown targets. We should handle the error immediately at the point of discovery instead of propagating it upward, and preferably in the simplest way: Die.

This allows cleaning up our "error-handling" spread across 5 crates.
Diffstat (limited to 'compiler/rustc_codegen_gcc')
-rw-r--r--compiler/rustc_codegen_gcc/src/int.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_codegen_gcc/src/int.rs b/compiler/rustc_codegen_gcc/src/int.rs
index 4a1db8d662a..f3552d9b12f 100644
--- a/compiler/rustc_codegen_gcc/src/int.rs
+++ b/compiler/rustc_codegen_gcc/src/int.rs
@@ -400,7 +400,7 @@ impl<'a, 'gcc, 'tcx> Builder<'a, 'gcc, 'tcx> {
             conv: Conv::C,
             can_unwind: false,
         };
-        fn_abi.adjust_for_foreign_abi(self.cx, ExternAbi::C { unwind: false }).unwrap();
+        fn_abi.adjust_for_foreign_abi(self.cx, ExternAbi::C { unwind: false });
 
         let ret_indirect = matches!(fn_abi.ret.mode, PassMode::Indirect { .. });