From f700ee4e709abb2243acd0fb8b9928160896c2bd Mon Sep 17 00:00:00 2001 From: Michael Goulet Date: Fri, 19 Jan 2024 20:04:14 +0000 Subject: Do not normalize closure signature when building FnOnce shim --- compiler/rustc_const_eval/src/interpret/cast.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'compiler/rustc_const_eval/src') diff --git a/compiler/rustc_const_eval/src/interpret/cast.rs b/compiler/rustc_const_eval/src/interpret/cast.rs index d296ff5928b..0cb5c634b22 100644 --- a/compiler/rustc_const_eval/src/interpret/cast.rs +++ b/compiler/rustc_const_eval/src/interpret/cast.rs @@ -117,8 +117,7 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> { def_id, args, ty::ClosureKind::FnOnce, - ) - .ok_or_else(|| err_inval!(TooGeneric))?; + ); let fn_ptr = self.fn_ptr(FnVal::Instance(instance)); self.write_pointer(fn_ptr, dest)?; } -- cgit 1.4.1-3-g733a5