Remove incorrect assert in trans
As an optimization, once unboxed closures receive their environment by value if it fits within the size of an `int`. An assert in this code path assumed that this would only occur if the environment had no more than a single free variable in it, but multiple smaller free variables can easily be packed into the space of an `int`, particularly if any of them are 0-sized. The assert can simply be removed. Closes #18652
This commit is contained in:
parent
b03a275519
commit
c3c72239b7
@ -322,7 +322,6 @@ fn load_unboxed_closure_environment<'blk, 'tcx>(
|
||||
self_type,
|
||||
"unboxed_closure_env");
|
||||
store_ty(bcx, bcx.fcx.llenv.unwrap(), datum.val, self_type);
|
||||
assert!(freevars.len() <= 1);
|
||||
datum.val
|
||||
} else {
|
||||
bcx.fcx.llenv.unwrap()
|
||||
|
Loading…
Reference in New Issue
Block a user