fix one element struct unpacking

I think this broke when we decided that we want to not drop empty fields from layouts?
This commit is contained in:
Folkert 2021-01-21 21:40:04 +01:00
parent ef89ff15a1
commit df8ab829a6
4 changed files with 33 additions and 17 deletions

View file

@ -3255,7 +3255,10 @@ pub fn with_hole<'a>(
match Wrapped::opt_from_layout(&record_layout) {
Some(result) => result,
None => Wrapped::SingleElementRecord,
None => {
debug_assert_eq!(field_layouts.len(), 1);
Wrapped::SingleElementRecord
}
}
};