-
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
{Rc,Arc}::new_cyclic documentation is insufficient #95672
Comments
|
Argh, thanks. Could've sworn I specifically double-checked that I wrote "cyclic"… |
For the most part, I'm biased because I know what |
I agree I had to read the documentation a few times to understand what this does. |
Hi! Just a quick note that changing the documentation for the Rust 1.60.0 release itself will likely not be possible, that'd require a full release rebuild. |
I'm sending a PR with explanations provided by @CAD97 so that it'll at least be in the next release. @pietroalbini Why do you need a full release rebuild btw? Isn't it possible to regen the docs without rebuilding everything like the |
I opened #95843. Feedback is very welcome. :) |
Our release tooling only supports building everything at the same time. |
Well, at least it'll be present in the next release with a beta backport. |
…u-se Improve Rc::new_cyclic and Arc::new_cyclic documentation Fixes rust-lang/rust#95672. cc `@CAD97` (since I used your explanations)
As I reported in the i.r-l.o prerelease thread, the documentation of the new(ly stabilized)
Rc
andArc
methodnew_cyclic
could really use some elaboration before the 1.60 release.I'm quite familiar with refcounting, strong/weak refs, etc. but just from the doc, I have no idea what problem the new method solves exactly, when I should use it, why the closure is needed, how the closure argument seems to come from "thin air", and what the closure should return.
The text was updated successfully, but these errors were encountered: