-
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
make Weak::ptr_eq
s into methods
#61893
Conversation
r? @rkruppe (rust_highfive has picked a reviewer for you, use r? to override) |
I don't know how to weigh "can be a method" against consistency with the methods on the strong counterparts. Is there precedent for this in other associated functions? |
cc @rust-lang/libs |
I think it makes sense for these to be methods. |
Ah, great. Let's do this, then. @bors r+ |
📌 Commit 387ac06 has been approved by |
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)
Rollup of 5 pull requests Successful merges: - #61702 (test more variants of enum-int-casting) - #61836 (Replace some uses of NodeId with HirId) - #61885 (Help LLVM better optimize slice::Iter(Mut)::len) - #61893 (make `Weak::ptr_eq`s into methods) - #61908 (don't ICE on large files) Failed merges: r? @ghost
Could no one have pinged me? I originally added this and this was merged before I even got a chance to even look at it... |
@Thomasdezeeuw yeah, sorry for that, i reffed the other issues but not you directly. |
This makes the
Weak::ptr_eq
s associated function into methods. There's no reason for methods onWeak
s to be associated functions, as there is noDered
thus no possibility of a collision. Also: methods can be called using the associated function syntax.follow up on #55987
Tracking issue for weak_ptr_eq