-
Notifications
You must be signed in to change notification settings - Fork 12.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tracking issue for weak_ptr_eq #55981
Comments
This is a small API introduction, it doesn't require an RFC. You can just file a PR. |
I have a question that why // when inner ptr is dangling, returns None.
pub fn weak_count(this: &Weak<T>) -> Option<usize> |
@F001 I agree, you could create a PR and then someone from the libs team will comment (atleast that is what I did). |
Add Weak.ptr_eq I hope the doc tests alone are good enough. We also might want to discuss the dangling pointer case (from `Weak::new()`). Updates rust-lang#55981.
Add Weak.ptr_eq I hope the doc tests alone are good enough. We also might want to discuss the dangling pointer case (from `Weak::new()`). Updates rust-lang#55981.
Add Weak.ptr_eq I hope the doc tests alone are good enough. We also might want to discuss the dangling pointer case (from `Weak::new()`). Updates rust-lang#55981.
Add Weak.ptr_eq I hope the doc tests alone are good enough. We also might want to discuss the dangling pointer case (from `Weak::new()`). Updates rust-lang#55981.
Add Weak.ptr_eq I hope the doc tests alone are good enough. We also might want to discuss the dangling pointer case (from `Weak::new()`). Updates rust-lang#55981.
I've updated the first comment to turn the issue into a tracking issue. |
Hello. This looks potentially useful. How long does a feature this small need to sit around before it's considered for stabilization? (if I'm not missing something, there's no issue raised with this currently) |
If the team agrees I can make a stabilisation pr for 1.35/1.36. |
Nominating to discuss stabilization. See PR #61797. |
make `Weak::ptr_eq`s into methods This makes the `Weak::ptr_eq`s associated function into methods. There's no reason for methods on `Weak`s to be associated functions, as there is no `Dered` thus no possibility of a collision. Also: methods can be called using the associated function syntax. follow up on rust-lang#55987 [Tracking issue for weak_ptr_eq](rust-lang#55981)
I'm going to de-nominate this because stabilization happens outside of triage meetings and happens when a libs team member feels confident enough to propose stabilization. |
Anything I can do to advance the stabilisation? |
@Thomasdezeeuw Apparently #61797 is now nominated, so the libs team should discuss it soon |
@jonas-schievink I missed that, thanks. |
… r=RalfJung Stabilise weak_ptr_eq Implemented in rust-lang#55987. Closes rust-lang#55981.
This is a tracking issue for
rc::Weak::ptr_eq
andsync::Weak::ptr_eq
.Feature gate: #![feature(weak_ptr_eq)].
Steps:
Old issue:
Rc
has a function calledptr_eq
it compares if theRc
points 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 returnfalse
if either one is dangling.The text was updated successfully, but these errors were encountered: