Join Nostr
2026-05-19 07:26:00 UTC
in reply to

chrysn on Nostr: nprofile1q…n4fmn The compiler would need to observe, over the whole program (in an ...

The compiler would need to observe, over the whole program (in an effort similar to finding never-constructed variants), that a &&T is never turned into a *const *const T (and probably never transmuted to/from and similar things). Then if T is not interior-mutable, it could decide that the layout of &&T is just the layout of &T, because all that can be *done* with it is to dereference it, and that operation can be provided from &T.