3 ms·
Unsafe Rust, the undecided interactions between &mut and raw pointers and Pin (whether &mut should invalidate raw pointers permanently or until the &mut ends, w
by nyanpasu64 5y ago
Unsafe Rust, the undecided interactions between &mut and raw pointers and Pin (whether &mut should invalidate raw pointers permanently or until the &mut ends, whether Pin<&mut T> should be noalias), whether Vec is marked noalias (it isn't) or Box should be (it is), is a mess of undecided semantics that people are nonetheless writing code that hopefully won't be declared illegal in a future compiler version.
- zozbot234 5y agoThe scope of noalias semantics can be formalized quite precisely by using separation logic, which can also act as a simpler and more elegant foundation for Rust's reference semantics and the so-called borrow-checker. Future editions of Rust will probably do this at some point in order to gain these benefits.