minirust icon indicating copy to clipboard operation
minirust copied to clipboard

Refactor size and alignment into layoutstrategy

Open Indeximal opened this issue 4 months ago • 1 comments

Since for structs with a trait object tail, the size cannot be known without knowing the align, having separate Align and Size strategies does not work. Therefore this PR prepares for trait objects by allowing the alignment to be dynamic and does this while merging them into a new struct LayoutStrategy.

This PR is still unfinished, but it compiles again, even though some tests fail. Next up would be to remove the hacks where currently an expect_align is used when a compute is more appropriate.

When reviewing this code I suggest first only looking at the first commit, the others are a mostly lot of churn.

Indeximal avatar Oct 04 '24 21:10 Indeximal