You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Was doing some relaxing reading of bumpalo's source (commit b22416c) when I found the following:
Allocator::grow receives new_layout, but the Allocator trait impl in bumpalo only passes new_size to Bump::grow.
What happens, if Allocator::grow gets called with a new layout that has a greater alignment requirement? Docs of Allocator::grow say:
Returns Err if the new layout does not meet the allocator’s size and alignment constraints of the allocator, or if growing otherwise fails.
So I guess it would be ok to return AllocError if the alignment requirements got stricter with the new layout, but the trait impl currently ignores that.