summary refs log tree commit diff
path: root/compiler/rustc_codegen_ssa
diff options
context:
space:
mode:
authorCamille GILLOT <gillot.camille@gmail.com>2022-02-04 23:18:28 +0100
committerCamille GILLOT <gillot.camille@gmail.com>2022-06-30 21:45:29 +0200
commit0161ecd13f31d3521791d419522bab55eabfa717 (patch)
tree1667cdb010a1646d09e56671a36a7aa1d72a8c8b /compiler/rustc_codegen_ssa
parent2e45cd4b69bec951dda2120c070a38406d97ea1f (diff)
downloadrust-0161ecd13f31d3521791d419522bab55eabfa717.tar.gz
rust-0161ecd13f31d3521791d419522bab55eabfa717.zip
Recover when failing to normalize closure signature.
Diffstat (limited to 'compiler/rustc_codegen_ssa')
-rw-r--r--compiler/rustc_codegen_ssa/src/mir/rvalue.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler/rustc_codegen_ssa/src/mir/rvalue.rs b/compiler/rustc_codegen_ssa/src/mir/rvalue.rs
index 81c1897694c..a5806d64d43 100644
--- a/compiler/rustc_codegen_ssa/src/mir/rvalue.rs
+++ b/compiler/rustc_codegen_ssa/src/mir/rvalue.rs
@@ -213,6 +213,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
                                     substs,
                                     ty::ClosureKind::FnOnce,
                                 )
+                                .expect("failed to normalize and resolve closure during codegen")
                                 .polymorphize(bx.cx().tcx());
                                 OperandValue::Immediate(bx.cx().get_fn_addr(instance))
                             }