News for hackers. Stuff that matters.
Re:Smoltcp: A small TCP/IP stack in Rust by cesarb on Thursday June 20, 2019 @12:58PM (#20234824)
> If you have two mutable references to the same thing at the end of an unsafe block, you'll won't get an issue in the unsafe code

This is wrong AFAIK: having two mutable references to the same thing is undefined behavior even within an unsafe block. An unsafe block only allows extra functionality (like dereferencing raw pointers), it doesn't change the semantics of functionality that's already allowed outside an unsafe block. That is: what would be undefined behavior outside an unsafe block is still undefined behavior inside an unsafe block.

There are no comments on this comment yet.