Uh oh!
There was an error while loading. Please reload this page.
Stabilise weak_ptr_eq - #61797
Conversation
rust-highfive
commented
Jun 13, 2019
r? @kennytm (rust_highfive has picked a reviewer for you, use r? to override) |
rust-highfive
commented
Jun 13, 2019
The job Click to expand the log.I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
Thomasdezeeuw
commented
Jun 13, 2019
I think the failure is unrelated to this pr. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
chpio
commented
Jun 13, 2019
Can we first change the method into a normal method (taking |
bors
commented
Jun 18, 2019
☔ The latest upstream changes (presumably #61915) made this pull request unmergeable. Please resolve the merge conflicts. |
Centril
commented
Jul 30, 2019
RalfJung
commented
Jul 31, 2019
There's not much code to look at, that seems fine. ;) The docs could be improved though IMO. It first says "Returns I think A better term might be "reference-counted object". |
Thomasdezeeuw
commented
Jul 31, 2019
I mostly copied the documentation from
(emphasis mine) The part in between brackets is arguably the most important part, maybe that should be moved to the forefront of the sentence more.
I agree with this, what do you suggest as concrete improvement? |
RalfJung
commented
Jul 31, 2019
That was deliberate; as I explained above, values that "compare equal but are not the same" is an odd concept. It indicates that the mathematical integer value "5" might have more to its "identity" that the fact that it is 5? Or maybe integers have provenance? I know what the text means, but I don't think the parenthetical helps. This is the old problem of comparing values vs. comparing locations (addresses) that hold values, except that it uses exactly the wrong term for what this code really does. |
Thomasdezeeuw
commented
Jul 31, 2019
I agree with your point. What terminology should be used instead? Should "values" not be mentioned at all perhaps and only talk of pointers? I'm really looking for some concrete documentation changes and any help here would be appreciated. |
RalfJung
commented
Jul 31, 2019
strawman proposal: "reference-counted object". |
RalfJung
commented
Jul 31, 2019
Alternatively we could be talking about comparing things "by their address", as we do in |
Thomasdezeeuw
commented
Aug 8, 2019
@RalfJung what do you think about the following? /// Returns `true` if the address of the two reference counted objects (the/// `Weaks`) are equal.////// # Notes////// Since this compares addresses it means that `Weak::new()` will always/// equal each other.Also do you want me to make the change to |
RalfJung
commented
Aug 8, 2019
The parenthetical is odd -- the object itself isn't weak, only the reference is.
Yes, this should be done consistently. |
Team member @sfackler has proposed to merge this. The next step is review by the rest of the tagged team members: No concerns currently listed. Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up! See this document for info about what commands tagged team members can give me. |
SimonSapin
commented
Aug 25, 2019
Is the |
RalfJung
commented
Aug 25, 2019
The edit I suggested at #61797 (comment) is still outstanding. |
Thomasdezeeuw
commented
Aug 25, 2019
I've just messed up this branch, will fix it asap. |
Thomasdezeeuw
commented
Aug 25, 2019
I've just rebased on master, update the stable attribute to 1.39 and added the doc changes as requested by @RalfJung. |
Thomasdezeeuw
commented
Aug 25, 2019
@SimonSapin I think the |
RalfJung
left a comment
There was a problem hiding this comment.
r=me: Docs look good enough for me (the entire Rc/Arc "value" terminology could be improved but that's a separate issue).
rfcbot
commented
Sep 4, 2019
🔔 This is now entering its final comment period, as per the review above. 🔔 |
rfcbot
commented
Sep 14, 2019
The final comment period, with a disposition to merge, as per the review above, is now complete. As the automated representative of the governance process, I would like to thank the author for their work and everyone else who contributed. The RFC will be merged soon. |
Centril
commented
Sep 14, 2019
@bors r=RalfJung rollup |
bors
commented
Sep 14, 2019
📌 Commit 307804a has been approved by |
… r=RalfJung Stabilise weak_ptr_eq Implemented in rust-lang#55987. Closesrust-lang#55981.
… r=RalfJung Stabilise weak_ptr_eq Implemented in rust-lang#55987. Closesrust-lang#55981.
Implemented in #55987.
Closes#55981.