Rc::ptr_eq should be unsafe because
โ Rust ๐ 2025-07-30 ๐ค surdeus ๐๏ธ 12Letโs say a Rc gets fully dropped: that means another Rc may take the same address, so a task that relies on ptr_eq may accidentally treat two different Rcs as pointing to the same.
Or, like JavaScript, Rc::ptr_eq also checks the identity hash so itโs safe?
4 posts - 4 participants
๐ท๏ธ Rust_feed