Issue #2380: A program can ask whether two values share their storage (pointer identity)

Open and answer this issue on GitHub.

std, views, decision · opened 2026-11-20 · updated 2026-11-22 · 0 comments

Found while std’s “nothing was copied” and “allocates nothing” Rust tests count allocations instead of comparing addresses or sizes (#2319)

Goal

A program (and above all a test) can ask whether two values share their storage: “this slice is a view into that text”, “the move copied nothing”, “the cache handed back the same value”. Today the only way a Nikaia test sees “nothing was copied” is counting allocations with std::mem::allocations() (ADR-400), which needs the counting allocator and says less than the identity itself.

To decide (no decision yet)

Done when

An ADR or specification section decides the form; the build is filed ready with a test in tests/compiler/tests/.

Back to Open Issues