chrysn on Nostr: nprofile1q…n4fmn The compiler would need to observe, over the whole program (in an ...
nprofile1qy2hwumn8ghj7un9d3shjtnyd968gmewwp6kyqpqxxt83adj3l3grgwtz9dkxfwvun97hz0mguc3rpe23kkdc46etcgqyn4fmn (nprofile…4fmn) 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.