about summary refs log tree commit diff
path: root/compiler/rustc_codegen_gcc/src/back/write.rs
diff options
context:
space:
mode:
authorbjorn3 <17426603+bjorn3@users.noreply.github.com>2025-08-24 10:47:04 +0000
committerbjorn3 <17426603+bjorn3@users.noreply.github.com>2025-08-24 11:20:41 +0000
commit525c6a356284ea47587f0316cec23cab290b986e (patch)
tree52eb25e42104f8f50065b403124b224fef9ec61e /compiler/rustc_codegen_gcc/src/back/write.rs
parent46a7d28a7d6a2ed007f9463afe763b6a53f5828e (diff)
downloadrust-525c6a356284ea47587f0316cec23cab290b986e.tar.gz
rust-525c6a356284ea47587f0316cec23cab290b986e.zip
Directly raise fatal errors inside the codegen backends
As opposed to passing it around through Result.
Diffstat (limited to 'compiler/rustc_codegen_gcc/src/back/write.rs')
-rw-r--r--compiler/rustc_codegen_gcc/src/back/write.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/compiler/rustc_codegen_gcc/src/back/write.rs b/compiler/rustc_codegen_gcc/src/back/write.rs
index c1231142c65..84bc7016271 100644
--- a/compiler/rustc_codegen_gcc/src/back/write.rs
+++ b/compiler/rustc_codegen_gcc/src/back/write.rs
@@ -6,7 +6,6 @@ use rustc_codegen_ssa::back::write::{BitcodeSection, CodegenContext, EmitObj, Mo
 use rustc_codegen_ssa::{CompiledModule, ModuleCodegen};
 use rustc_fs_util::link_or_copy;
 use rustc_session::config::OutputType;
-use rustc_span::fatal_error::FatalError;
 use rustc_target::spec::SplitDebuginfo;
 
 use crate::base::add_pic_option;
@@ -17,7 +16,7 @@ pub(crate) fn codegen(
     cgcx: &CodegenContext<GccCodegenBackend>,
     module: ModuleCodegen<GccContext>,
     config: &ModuleConfig,
-) -> Result<CompiledModule, FatalError> {
+) -> CompiledModule {
     let dcx = cgcx.create_dcx();
     let dcx = dcx.handle();
 
@@ -246,7 +245,7 @@ pub(crate) fn codegen(
         }
     }
 
-    Ok(module.into_compiled_module(
+    module.into_compiled_module(
         config.emit_obj != EmitObj::None,
         cgcx.target_can_use_split_dwarf && cgcx.split_debuginfo == SplitDebuginfo::Unpacked,
         config.emit_bc,
@@ -254,7 +253,7 @@ pub(crate) fn codegen(
         config.emit_ir,
         &cgcx.output_filenames,
         cgcx.invocation_temp.as_deref(),
-    ))
+    )
 }
 
 pub(crate) fn save_temp_bitcode(