Compile higher-order low-level calls that take functions with no closure args

Closes #3571
This commit is contained in:
Ayaz Hafiz 2022-07-19 15:50:36 -04:00
parent 7b9b855dcc
commit 2cdb951752
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58
3 changed files with 47 additions and 14 deletions

View file

@ -800,13 +800,13 @@ impl<'a> LambdaSet<'a> {
}
pub fn is_represented(&self) -> Option<Layout<'a>> {
if let Layout::Struct {
field_layouts: &[], ..
} = self.representation
{
None
} else {
Some(*self.representation)
match self.representation {
Layout::Struct {
field_layouts: &[], ..
}
| Layout::Builtin(Builtin::Bool)
| Layout::Builtin(Builtin::Int(..)) => None,
repr => Some(*repr),
}
}