minirust
minirust copied to clipboard
Refactor size and alignment into layoutstrategy
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.