-
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
docs improvement sync::atomic::Atomic* #44854
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @steveklabnik (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
Thanks for the PR @lucasem! @steveklabnik (or someone else) should review your PR soon. |
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.
Looking good! One quick question, and then r=me.
/// integer type, [` | ||
#[doc = $s_int_type] | ||
/// `]( | ||
#[doc = $int_ref] |
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.
whoah, could we use this trickery to fix...
/// | ||
/// Please note that examples are shared between atomic variants of | ||
/// primitive integer types, so it's normal that they are all | ||
/// demonstrating [`AtomicIsize`]. |
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.
... this?
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.
You mean to replace that particular item? All of the examples are actually using AtomicIsize
, so that's exactly the atomic int type that should be there.
I thought about fixing (meta-parameterizing) the examples, but that is unfortunately not doable because of the way the docs are generated (I tried!).
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.
I meant the examples. No worries, I didn't think it was actually possible, but I didn't realize the above was possible either, so... 😄 👍
@bors: r+ rollup |
📌 Commit f7fd04a has been approved by |
docs improvement sync::atomic::Atomic* Addresses the `Atomic*` part of rust-lang#29377. r? @steveklabnik
☔ The latest upstream changes (presumably #44936) made this pull request unmergeable. Please resolve the merge conflicts. |
Merged in #44936. |
…teveklabnik Expand the documentation for the `std::sync` module I've tried to expand the documentation for Rust's synchronization primitives. The module level documentation explains why synchronization is required when working with a multiprocessor system, and then links to the appropiate structure in this module. Fixes rust-lang#29377, since this should be the last item on the checklist (documentation for `Atomic*` was fixed in rust-lang#44854, but not ticked off the checklist).
Addresses the
Atomic*
part of #29377.r? @steveklabnik