Closed
Description
This is a tracking issue for rc::Weak::ptr_eq
and sync::Weak::ptr_eq
.
Feature gate: #![feature(weak_ptr_eq)].
Steps:
- Implement the RFC (Add Weak.ptr_eq #55987).
- Stabilization PR.
Old issue:
Rc
has a function called ptr_eq
it compares if the Rc
points to the value, not the values themselves. I would like to add the same function to Weak
. I got an implementation but have two questions:
- Does this require an RFC? Or is this small enough to do without one.
- What to do with dangling pointer, e.g. created by
Weak::new()
. I would argue always returnfalse
if either one is dangling.