News for hackers. Stuff that matters.
Re:Sealed Rust: A plan to bring Rust to safety critical soft... by jasonhansel on Wednesday June 05, 2019 @02:20PM (#20107521)
Wow! I'm really impressed. One thing that might help is to require formal verification of code marked as "unsafe" to ensure memory safety (or simply to replace unsafe code in the standard library with safe-but-slower code, e.g. by having a version of the standard library where the get_unchecked() method actually does perform bounds checks).
Re:Sealed Rust: A plan to bring Rust to safety critical soft... by Argorak on Wednesday June 05, 2019 @02:27PM (#20107612)
Unsafe code is a really hot subject in the Rust project already and there's tons of research work around that done by Ralf: https://www.ralfj.de/blog/categories/research.html.

He's also building Rust tooling for finding bugs in this space, see for example miri.

https://play.rust-lang.org/?version=stable&mode=debug&editio...

(click "Tools" -> "Miri")

This will figure out that you do produce an illegal borrow in that unsafe code.