Get the latest tech news

Rust: Box Is a Unique Type


About better aliasing semantics for `Box`

This kind of partial deref move is just one of the spectacular magic tricks box has up its sleeve, and they exist for good reason: They are very useful. I cannot recommend Miri highly enough for all unsafe code you’re writing (sadly support for some IO functions and FFI is still lacking, and it’s still very slow). It has to, since otherwise the optimizer wouldn’t be allowed to change observable behaviour (since the assert doesn’t fail in debug mode).$ cargo miri run…

Get the Android app

Or read this on Hacker News

Read more on:

Photo of box

box

Photo of Rust

Rust

Photo of unique type

unique type

Related news:

News photo

Why Rust Isn't Killing C++

News photo

Fast Fourier Transform in Rust

News photo

Fast, simple, hard real time allocator for Rust