Recover when failing to normalize closure signature.
This commit is contained in:
parent
2e45cd4b69
commit
0161ecd13f
7 changed files with 34 additions and 9 deletions
|
@ -100,7 +100,8 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
|
|||
def_id,
|
||||
substs,
|
||||
ty::ClosureKind::FnOnce,
|
||||
);
|
||||
)
|
||||
.ok_or_else(|| err_inval!(TooGeneric))?;
|
||||
let fn_ptr = self.create_fn_alloc_ptr(FnVal::Instance(instance));
|
||||
self.write_pointer(fn_ptr, dest)?;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue