-
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
Document .0 to unpack integer from Wrapping #53703
Conversation
r? @KodrAus (rust_highfive has picked a reviewer for you, use r? to override) |
src/libcore/num/mod.rs
Outdated
@@ -122,6 +122,9 @@ nonzero_integers! { | |||
/// all standard arithmetic operations on the underlying value are | |||
/// intended to have wrapping semantics. | |||
/// | |||
/// The enclosed integer can be retrieved through the `.0` index of the | |||
/// `Wrapping` tuple. |
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.
Wrapping
isn't exclusively for integers – one can do Wrapping(0.0f32)
if they want. So we may want this to say something like:
The underling value can be...
or
The enclosed number can be...
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.
Oh thanks, fixed.
Thanks! @bors r+ rollup |
📌 Commit 775f707669817f439c095ace0897c6ee8ba239fc has been approved by |
Seems like two submodules ( |
@bors r- |
Good catch @mzji |
Sorry, I'm confused by git submodules, and that was not intentional. I'll work out how to get them out. |
You may be able to revert the submodule updates via |
Ping from triage, @sourcefrog: Do you think you'll be able to make the requested changes? If you prefer, members of the Rust team can also push the requested updates to your branch. (Let me know if that is the case, and I can do it). |
@TimNN yes, doing that now. I tried |
775f707
to
597c065
Compare
OK should be clean now, please take another look. |
@bors r+ rollup |
📌 Commit 597c065 has been approved by |
Document .0 to unpack integer from Wrapping
Rollup of 15 pull requests Successful merges: - #52514 (Fix a few AMDGPU related issues) - #53703 (Document .0 to unpack integer from Wrapping) - #53777 (Implemented map_or_else for Result<T, E>) - #54031 (A few cleanups and minor improvements to rustc_passes) - #54046 (Update documentation for fill_buf in std::io::BufRead) - #54064 (`&CStr`, not `CStr`, is the counterpart of `&str`) - #54072 (Stabilization change for mod.rs) - #54073 (docs: Use dollar sign for all bash prompts) - #54074 (simplify ordering for Kind) - #54085 (Remove documentation about proc_macro being bare-bones) - #54087 (rustdoc: Remove generated blanket impls from trait pages) - #54106 (Reexport CheckLintNameResult) - #54107 (Fix typos in libstd hash map) - #54136 (Update LLVM to fix GlobalISel dbg.declare) - #54142 (Recover proper regression test for issue #16278.) Failed merges: r? @ghost
No description provided.