]> git.lizzy.rs Git - rust.git/commit
Remove incorrect assert in trans
authorBrian Koropoff <bkoropoff@gmail.com>
Fri, 7 Nov 2014 04:40:32 +0000 (20:40 -0800)
committerBrian Koropoff <bkoropoff@gmail.com>
Fri, 7 Nov 2014 04:40:32 +0000 (20:40 -0800)
commitc3c72239b7130b947deb6272c6d0c05872697d91
tree97383144cef90d2f838c30036df5b419ab4ec82f
parentb03a2755193cd756583bcf5831cf4545d75ecb8a
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
src/librustc/middle/trans/closure.rs