make Weak::ptr_eqs into methods#61893
Merged
bors merged 1 commit intorust-lang:masterfrom Jun 18, 2019
Merged
Conversation
Contributor
|
r? @rkruppe (rust_highfive has picked a reviewer for you, use r? to override) |
Contributor
|
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? |
Contributor
|
cc @rust-lang/libs |
Member
|
I think it makes sense for these to be methods. |
Contributor
|
Ah, great. Let's do this, then. @bors r+ |
Collaborator
|
📌 Commit 387ac06 has been approved by |
Centril
added a commit
to Centril/rust
that referenced
this pull request
Jun 17, 2019
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)
bors
added a commit
that referenced
this pull request
Jun 17, 2019
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
Contributor
|
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... |
Contributor
Author
|
@Thomasdezeeuw yeah, sorry for that, i reffed the other issues but not you directly. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This makes the
Weak::ptr_eqs associated function into methods. There's no reason for methods onWeaks to be associated functions, as there is noDeredthus 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