Recover when failing to normalize closure signature.

This commit is contained in:
Camille GILLOT 2022-02-04 23:18:28 +01:00
parent f516ba2240
commit a71e691e74

View File

@ -686,6 +686,7 @@ fn is_fat_ptr<'tcx>(fx: &FunctionCx<'_, '_, 'tcx>, ty: Ty<'tcx>) -> bool {
substs,
ty::ClosureKind::FnOnce,
)
.expect("failed to normalize and resolve closure during codegen")
.polymorphize(fx.tcx);
let func_ref = fx.get_function_ref(instance);
let func_addr = fx.bcx.ins().func_addr(fx.pointer_type, func_ref);