1 karma · joined Jul 10, 2025 (1y ago) · 7 submissions
comment 1y ago · link · parent
https://users.rust-lang.org/t/polonius-is-more-ergonomic-tha...
>I recommend watching the video @nerditation linked. I believe Amanda mentioned somewhere that Polonius is 5000x slower than the existing borrow-checker; IIRC the plan isn't to use Polonius instead of NLL, but rather use NLL and kick off Polonius for certain failure cases.
comment 1y ago · link · parent
https://github.com/rust-lang/rust/pull/139553
This is why it may be a good idea to run MIRI on your Rust code, even when it has no unsafe, since a library like Rust stdlib might have UB.
comment 1y ago · link · parent
The aliasing rules of Rust for mutable references are different and more difficult than strict aliasing in C and C++.
Strict aliasing in C and C++ are also called TBAA, since they are based on compatible types. If types are compatible, pointers can alias. This is different in Rust, where mutable references absolutely may never alias, not even if the types are the same.
Rust aliasing is more similar to C _restrict_.
The Linux kernel goes in the other direction and has strict aliasing optimization disabled.
comment 1y ago · link · parent
https://github.com/rust-lang/rust/pull/139553#issuecomment-2...
The above issue was part of diagnosing UB in Rust stdlib.
comment 1y ago · link · parent
https://github.com/rust-lang/rust/commit/71f5cfb21f3fd2f1740...
Without MIRI, a lot of Rust developers would be lost, as they do not even attempt to understand unsafe. And MIRI cannot and does not cover everything, no matter how good and beloved it is.
It should have been possible for senior Rust developers to write UB-free code without having to hope that MIRI saves them.