News for hackers. Stuff that matters.
Re:Solving the ABA Problem in Rust with Tagged Pointers by whytevuhuni on Saturday February 15, 2025 @08:40AM (#43058398)
That's right, unsafety extends to the whole module, and anything else that relies on the module's internal implementation. Generally all the way up to the abstraction's public API, whatever that abstraction is (a Vec, a Mutex, etc).

But it's nevertheless still not different from other languages that are deemed memory safe.

Re:Solving the ABA Problem in Rust with Tagged Pointers by kobebrookskC3 on Saturday February 15, 2025 @07:23PM (#43063984)
modules are meant to be the boundary for a safe abstraction, but sometimes you get fun holes like https://github.com/rust-lang/rust/issues/128872 where you can implement Copy for a type in a different module in the same crate, even if the fields are private
Re:Solving the ABA Problem in Rust with Tagged Pointers by whytevuhuni on Sunday February 16, 2025 @02:28AM (#43066118)
I'll admit, that's a pretty funny bug. Thankfully it seems like the Rust devs are pretty keen on fixing it somehow.