From 0161ecd13f31d3521791d419522bab55eabfa717 Mon Sep 17 00:00:00 2001 From: Camille GILLOT Date: Fri, 4 Feb 2022 23:18:28 +0100 Subject: Recover when failing to normalize closure signature. --- compiler/rustc_monomorphize/src/collector.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'compiler/rustc_monomorphize/src') diff --git a/compiler/rustc_monomorphize/src/collector.rs b/compiler/rustc_monomorphize/src/collector.rs index 2af22e129a5..d4978c56568 100644 --- a/compiler/rustc_monomorphize/src/collector.rs +++ b/compiler/rustc_monomorphize/src/collector.rs @@ -730,7 +730,8 @@ impl<'a, 'tcx> MirVisitor<'tcx> for MirNeighborCollector<'a, 'tcx> { def_id, substs, ty::ClosureKind::FnOnce, - ); + ) + .expect("failed to normalize and resolve closure during codegen"); if should_codegen_locally(self.tcx, &instance) { self.output.push(create_fn_mono_item(self.tcx, instance, span)); } -- cgit 1.4.1-3-g733a5