3 ms·
It depends a bit on what you want to do. I made one attempt where I needed to carry a 'arena lifetime everywhere which was really tricky. A second attempt was
by the_mitsuhiko 2y ago
It depends a bit on what you want to do. I made one attempt where I needed to carry a 'arena lifetime everywhere which was really tricky. A second attempt was to tag the Value internally with an ever increasing ID of arenas. However the latter becomes dangerous very quickly because nothing binds them together and you end up with a lot of unsafe code and I had no trust in my creation.
- infogulch 2y agoYeah that makes sense. Maybe arenas will be viable once the working group makes progress on allocators. https://github.com/rust-lang/wg-allocators https://github.com/rust-lang/wg-allocators