Expand description
Generic index-based arena for AST nodes.
Replaces Box<T> with a Copy integer handle (Id<T>) into a flat
Vec<T> owned by an Arena<T>. Every Id<T> is tagged with the id of
the arena it was allocated from, so using it against the wrong arena
panics immediately at the access site instead of silently reading
unrelated data or panicking later with a confusing out-of-bounds error.
Structs§
Statics§
- NEXT_
ARENA_ 🔒ID - Global counter handing out a unique id to every
Arena<T>that’s ever constructed, soId<T>s can be checked against their origin arena.