-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Don't use "weak count" around Weak::from_raw_ptr #74782
Conversation
r? @dtolnay (rust_highfive has picked a reviewer for you, use r? to override) |
cc @CAD97 |
Rather than try to line-comment, here's my take on the same information; perhaps you can find a happy medium somewhere.
|
5b04820
to
d96dd6d
Compare
And I hoped navigating the pitfalls of unsafety in the implementation would be the hard part of the feature 😇 OK, I've tried to rewrite it while avoiding any kind of new terminology (like suspending), intuitive descriptions of frozen, etc. I hope it's still readable and no standard-lawyer can prove it does something else than it does. |
☔ The latest upstream changes (presumably #73265) made this pull request unmergeable. Please resolve the merge conflicts. |
d96dd6d
to
ad6d63e
Compare
As `Rc/Arc::weak_count` returns 0 when having no strong counts, this could be confusing and it's better to avoid using that completely. Closes rust-lang#73840.
Rebased on that big-bang move everything PR. Sorry if it makes the reviewing harder, but I think it should not be a big problem with changes this small and incremental reviewing doesn't really help here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, this looks great.
@bors r+ rollup |
📌 Commit ad6d63e has been approved by |
⌛ Testing commit ad6d63e with merge 45a9dbd0690ffc6b75d596689c1a2e6841fff5a1... |
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 |
💔 Test failed - checks-actions |
I'm trying to look at what failed on CI. I don't know for sure, but it seems like it fails on downloading some docker image? |
This looks like an internal error from crates.io, nothing to do with your PR.
@bors retry |
⌛ Testing commit ad6d63e with merge e532d6541289e12b5586f3a1f63f0153a45e6233... |
💥 Test timed out |
In what way did this time out? Oh, x86_64-apple on Azure timed out after five hours: https://github.com/rust-lang-ci/rust/runs/926325983 This can't possibly be the cause of any failures/timeouts, though, it's just a doc change. @bors rollup=always (I don't know if r+ rollup sets always but just in case (oh could've sworn bors let me rollup my own PR; guess that's a special case)) |
@CAD97: 🔑 Insufficient privileges: not in try users |
1 similar comment
@CAD97: 🔑 Insufficient privileges: not in try users |
@bors retry |
…arth Rollup of 9 pull requests Successful merges: - rust-lang#74751 (Clean up E0730 explanation) - rust-lang#74782 (Don't use "weak count" around Weak::from_raw_ptr) - rust-lang#74835 (Clean up E0734 explanation) - rust-lang#74871 (Enable docs on dist-x86_64-musl) - rust-lang#74905 (Avoid bool-like naming) - rust-lang#74907 (Clean up E0740 explanation) - rust-lang#74915 (rustc: Ignore fs::canonicalize errors in metadata) - rust-lang#74934 (Improve diagnostics when constant pattern is too generic) - rust-lang#74951 (Cherry-pick the release notes for 1.45.1) Failed merges: r? @ghost
As
Rc/Arc::weak_count
returns 0 when having no strong counts, thiscould be confusing and it's better to avoid using that completely.
Closes #73840.