diff options
| author | bors <bors@rust-lang.org> | 2022-12-12 07:57:41 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-12-12 07:57:41 +0000 |
| commit | 2176e3a7a4a8dfbea92f3104244fbf8fad4faf9a (patch) | |
| tree | d61801b1c69a7d343e3e366fee14440704166395 /compiler/rustc_codegen_ssa/src | |
| parent | 2cd2070af7643ad88d280a4933bc4fb60451e521 (diff) | |
| parent | 5877a3fce1b75badccaa18d03165baa8495434a0 (diff) | |
| download | rust-2176e3a7a4a8dfbea92f3104244fbf8fad4faf9a.tar.gz rust-2176e3a7a4a8dfbea92f3104244fbf8fad4faf9a.zip | |
Auto merge of #105592 - matthiaskrgr:rollup-1cazogq, r=matthiaskrgr
Rollup of 2 pull requests Successful merges: - #104997 (Move tests) - #105569 (`bug!` with a better error message for failing `Instance::resolve`) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_codegen_ssa/src')
| -rw-r--r-- | compiler/rustc_codegen_ssa/src/mir/block.rs | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/compiler/rustc_codegen_ssa/src/mir/block.rs b/compiler/rustc_codegen_ssa/src/mir/block.rs index f3f5ddb52d6..831956cb2be 100644 --- a/compiler/rustc_codegen_ssa/src/mir/block.rs +++ b/compiler/rustc_codegen_ssa/src/mir/block.rs @@ -751,10 +751,13 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> { let (instance, mut llfn) = match *callee.layout.ty.kind() { ty::FnDef(def_id, substs) => ( Some( - ty::Instance::resolve(bx.tcx(), ty::ParamEnv::reveal_all(), def_id, substs) - .unwrap() - .unwrap() - .polymorphize(bx.tcx()), + ty::Instance::expect_resolve( + bx.tcx(), + ty::ParamEnv::reveal_all(), + def_id, + substs, + ) + .polymorphize(bx.tcx()), ), None, ), |
