about summary refs log tree commit diff
path: root/compiler/rustc_codegen_gcc
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2024-03-10 11:49:27 +0100
committerRalf Jung <post@ralfj.de>2024-03-10 11:49:33 +0100
commitaa9145e6ea9ae518355b2c8c7f6de6d61c385e38 (patch)
tree3879e04522105863a96f4a018cd4861ec177674e /compiler/rustc_codegen_gcc
parent094a6204f590e6b4770b5f26359dd17a07897adf (diff)
downloadrust-aa9145e6ea9ae518355b2c8c7f6de6d61c385e38.tar.gz
rust-aa9145e6ea9ae518355b2c8c7f6de6d61c385e38.zip
use Instance::expect_resolve() instead of unwraping Instance::resolve()
Diffstat (limited to 'compiler/rustc_codegen_gcc')
-rw-r--r--compiler/rustc_codegen_gcc/src/context.rs6
1 files changed, 2 insertions, 4 deletions
diff --git a/compiler/rustc_codegen_gcc/src/context.rs b/compiler/rustc_codegen_gcc/src/context.rs
index bc3d62f2679..8f643c7db72 100644
--- a/compiler/rustc_codegen_gcc/src/context.rs
+++ b/compiler/rustc_codegen_gcc/src/context.rs
@@ -473,14 +473,12 @@ impl<'gcc, 'tcx> MiscMethods<'tcx> for CodegenCx<'gcc, 'tcx> {
         let tcx = self.tcx;
         let func = match tcx.lang_items().eh_personality() {
             Some(def_id) if !wants_msvc_seh(self.sess()) => {
-                let instance = ty::Instance::resolve(
+                let instance = ty::Instance::expect_resolve(
                     tcx,
                     ty::ParamEnv::reveal_all(),
                     def_id,
                     ty::List::empty(),
-                )
-                .unwrap()
-                .unwrap();
+                );
 
                 let symbol_name = tcx.symbol_name(instance).name;
                 let fn_abi = self.fn_abi_of_instance(instance, ty::List::empty());