We have all used Box<T> before in our Rust code. It’s a glorious type, with great ergonomics and flexibitility. We can use it to put our values on the heap, but it can do even more than that!

struct Fields {
@@ -129,6 +129,6 @@ are very strong, and still giving code an option to obtain these seems useful. O
 &'static mut T that is unleaked for drop, but the semantics of this are still unclear.
 If that is not possible, exposing std::ptr::Unique (with it getting boxes aliasing semantics) could be desirable. For this, all existing usages of Unique
 inside the standard library would have to be removed. We could also offer a std::boxed::UniqueBox that keeps the current semantics, but this would also bring direct aliasing
-decisions more towards safe code, which I am not a huge fan of. Ownership is enough already.

I guess what I am wishing for are some good and flexible raw pointer types. But that’s still in the stars…

For more information about this topic, see https://github.com/rust-lang/unsafe-code-guidelines/issues/326