diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2024-03-10 22:16:43 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-03-10 22:16:43 +0100 |
| commit | b02f2a0e76f46f7ed244a686c4909635495ee254 (patch) | |
| tree | ad1c9e9fbbf48b44f8b59490edfd25e26534bfce /compiler/rustc_codegen_gcc | |
| parent | ff09d32d8321cce425e5f266e1b9372e9b749a20 (diff) | |
| parent | aa9145e6ea9ae518355b2c8c7f6de6d61c385e38 (diff) | |
| download | rust-b02f2a0e76f46f7ed244a686c4909635495ee254.tar.gz rust-b02f2a0e76f46f7ed244a686c4909635495ee254.zip | |
Rollup merge of #122286 - RalfJung:resolve, r=compiler-errors
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.rs | 6 |
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()); |
