This commit is contained in:
Folkert 2021-01-17 02:29:52 +01:00
parent c1265574b3
commit cf0b1ba206
3 changed files with 5 additions and 4 deletions

View file

@ -217,7 +217,7 @@ pub fn block_of_memory<'ctx>(
block_of_memory_help(context, union_size)
}
fn block_of_memory_help<'ctx>(context: &'ctx Context, union_size: u32) -> BasicTypeEnum<'ctx> {
fn block_of_memory_help(context: &Context, union_size: u32) -> BasicTypeEnum<'_> {
// The memory layout of Union is a bit tricky.
// We have tags with different memory layouts, that are part of the same type.
// For llvm, all tags must have the same memory layout.

View file

@ -3867,6 +3867,7 @@ pub fn with_hole<'a>(
}
}
#[allow(clippy::type_complexity)]
fn sorted_field_symbols<'a>(
env: &mut Env<'a, '_>,
procs: &mut Procs<'a>,

View file

@ -1241,7 +1241,7 @@ impl<'a> WrappedVariant<'a> {
.expect("tag name is not in its own type");
debug_assert!(tag_id < 256);
(tag_id as u8, argument_layouts.clone())
(tag_id as u8, *argument_layouts)
}
NullableWrapped {
nullable_id,
@ -1264,7 +1264,7 @@ impl<'a> WrappedVariant<'a> {
}
debug_assert!(tag_id < 256);
(tag_id as u8, argument_layouts.clone())
(tag_id as u8, *argument_layouts)
}
}
NullableUnwrapped {
@ -1278,7 +1278,7 @@ impl<'a> WrappedVariant<'a> {
} else {
debug_assert_eq!(other_name, tag_name);
(!*nullable_id as u8, other_fields.clone())
(!*nullable_id as u8, *other_fields)
}
}
}