# Should std have an Arena type?

**URL:** <https://internals.rust-lang.org/t/should-std-have-an-arena-type/24653>\
**Category:** libs\
**Created:** [October 5, 2026, 3:43pm UTC](https://internals.rust-lang.org/t/should-std-have-an-arena-type/24653 "2026-10-05T15:43:13Z")\
**Posts on this page:** 2\
**Page:** 2

<div class="post-metadata">

**Author:** ![tcsc](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/tcsc/32/3806_2.png) [@tcsc](https://internals.rust-lang.org/u/tcsc)\
**Post date:** [October 15, 2026, 3:36am UTC](https://internals.rust-lang.org/t/should-std-have-an-arena-type/24653/21 "2026-10-15T03:36:15Z")

</div>

A reason to have a non-allocator version of such a type in the stdlib would be that something like typed\_arena (which I maintain, although very passively) cannot be an implementation which is both optimally efficient an optimally general without `#[may_dangle]`. `typed_arena` opts for the optimally general version (which is useful even for graph construction), by building it on top of `Vec<T>` (and leveraging `Vec<T>`'s `#[may_dangle]`), but this has performance limitations. Given that `#[may_dangle]` very well may never be stabilized, this is unfortunate.

That said, it's possible allocators solve this sufficiently. I haven't thought about it very deeply, to be honest.

---

<div class="post-metadata">

**Author:** ![quinedot](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/quinedot/32/7294_2.png) [@quinedot](https://internals.rust-lang.org/u/quinedot)\
**Post date:** [October 15, 2026, 4:28am UTC](https://internals.rust-lang.org/t/should-std-have-an-arena-type/24653/22 "2026-10-15T04:28:52Z")

</div>

> [@tcsc](#):
>
> Given that `#[may_dangle]` very well may never be stabilized, this is unfortunate.

It (or it's successor) should be, IMNSHO. `std` collections shouldn't be observably magic in ways that are never intended for the wider ecosystem.

[Previous page](https://internals.rust-lang.org/t/should-std-have-an-arena-type/24653.md?page=1)
