allocate_slots

Function allocate_slots 

Source
pub(crate) fn allocate_slots(
    fields: &[FieldInfo],
) -> Result<Vec<LayoutField<'_>>>
Expand description

Build layout IR from field information.

This function performs slot allocation and packing decisions, returning a complete layout that can be used for code generation. The actual byte-level packing calculations (offsets, whether fields actually pack) are computed at compile-time via const expressions in the generated code.

The IR captures the structure of the layout (which fields share base slots, which are manually assigned, etc.) using the SlotAssignment enum.