Do not normalize closure signature when building FnOnce shim

This commit is contained in:
Michael Goulet 2024-01-19 20:04:14 +00:00
parent 3066253050
commit f700ee4e70
7 changed files with 20 additions and 18 deletions

View file

@ -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)?;
}