Skip to content

Commit e3d70e2

Browse files
committed
Sync from rust ed620cf
2 parents 7e10f1a + f7c76ad commit e3d70e2

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/abi/mod.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -348,10 +348,9 @@ pub(crate) fn codegen_terminator_call<'tcx>(
348348

349349
// Handle special calls like intrinsics and empty drop glue.
350350
let instance = if let ty::FnDef(def_id, substs) = *func.layout().ty.kind() {
351-
let instance = ty::Instance::resolve(fx.tcx, ty::ParamEnv::reveal_all(), def_id, substs)
352-
.unwrap()
353-
.unwrap()
354-
.polymorphize(fx.tcx);
351+
let instance =
352+
ty::Instance::expect_resolve(fx.tcx, ty::ParamEnv::reveal_all(), def_id, substs)
353+
.polymorphize(fx.tcx);
355354

356355
if fx.tcx.symbol_name(instance).name.starts_with("llvm.") {
357356
crate::intrinsics::codegen_llvm_intrinsic_call(

0 commit comments

Comments
 (0)