Open
Description
What is the validity invariant of Box<T>
? If this was just a library type it would be the same as Unique<T>
, which is the same as NonNull<T>
. But actually most of the compiler treats Box<T>
a lot like a reference, so at least de-facto right now, Box<T>
likely has the same validity invariant as &T
and &mut T
(which is discussed in #76 and #77).
Also see some prior discussion in rust-lang/rust-memory-model#3.