by Philpax · 1y ago · 0 comments
Also see various arena allocator crates, etc.
And if you intentionally leak everything it is onerous to get the borrow checker to realize that unless you use a leaked box for all declaration/allocations, which introduces both friction and performance regressions (due to memory access patterns) because the use of custom allocators doesn’t factor into lifetime analysis.
(Spoken as a die-hard rust dev that still thinks it’s the better language than zig for most everything.)
ManuallyDrop would presumably be implemented on large data structures where it matters, not on every single type involved in the program.