This is a tracking issue for rc::Weak::ptr_eq and sync::Weak::ptr_eq.
Feature gate: #![feature(weak_ptr_eq)].
Steps:
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 return false if either one is dangling.
This is a tracking issue for
rc::Weak::ptr_eqandsync::Weak::ptr_eq.Feature gate: #![feature(weak_ptr_eq)].
Steps:
Old issue:
Rchas a function calledptr_eqit compares if theRcpoints to the value, not the values themselves. I would like to add the same function toWeak. I got an implementation but have two questions:Weak::new(). I would argue always returnfalseif either one is dangling.