-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
to_xe_bytes for isize and usize returns an array of different size #59979
Conversation
r? @bluss (rust_highfive has picked a reviewer for you, use r? to override) |
☔ The latest upstream changes (presumably #60013) made this pull request unmergeable. Please resolve the merge conflicts. |
r? @ehuss |
@bors delegate=ehuss |
✌️ @ehuss can now approve this pull request |
Can a similar treatment be done for |
Updated PR with |
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 |
... on different platforms. Official rustdoc of [`usize::to_le_bytes`](https://doc.rust-lang.org/std/primitive.usize.html#method.to_le_bytes) displays signature ``` pub fn to_ne_bytes(self) -> [u8; 8] ``` which might be misleading: this function returns 4 bytes on 32-bit systems.
Thank you! @bors r+ rollup |
📌 Commit 764e366 has been approved by |
⌛ Testing commit 764e366 with merge 3b68ed23f1364433b0d6a7f652ae73a42b38a10a... |
💔 Test failed - checks-travis |
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 |
Network error: @bors retry |
to_xe_bytes for isize and usize returns an array of different size ... on different platforms. Official rustdoc of [`usize::to_le_bytes`](https://doc.rust-lang.org/std/primitive.usize.html#method.to_le_bytes) displays signature ``` pub fn to_ne_bytes(self) -> [u8; 8] ``` which might be misleading: this function returns 4 bytes on 32-bit systems. With this commit applied rustdoc for `isize` and `usize` is this: <img width="740" alt="2019-04-15_0020" src="https://user-images.githubusercontent.com/28969/56100765-9f69b380-5f14-11e9-974c-daa25edaa881.png">
to_xe_bytes for isize and usize returns an array of different size ... on different platforms. Official rustdoc of [`usize::to_le_bytes`](https://doc.rust-lang.org/std/primitive.usize.html#method.to_le_bytes) displays signature ``` pub fn to_ne_bytes(self) -> [u8; 8] ``` which might be misleading: this function returns 4 bytes on 32-bit systems. With this commit applied rustdoc for `isize` and `usize` is this: <img width="740" alt="2019-04-15_0020" src="https://user-images.githubusercontent.com/28969/56100765-9f69b380-5f14-11e9-974c-daa25edaa881.png">
to_xe_bytes for isize and usize returns an array of different size ... on different platforms. Official rustdoc of [`usize::to_le_bytes`](https://doc.rust-lang.org/std/primitive.usize.html#method.to_le_bytes) displays signature ``` pub fn to_ne_bytes(self) -> [u8; 8] ``` which might be misleading: this function returns 4 bytes on 32-bit systems. With this commit applied rustdoc for `isize` and `usize` is this: <img width="740" alt="2019-04-15_0020" src="https://user-images.githubusercontent.com/28969/56100765-9f69b380-5f14-11e9-974c-daa25edaa881.png">
Rollup of 8 pull requests Successful merges: - #59979 (to_xe_bytes for isize and usize returns an array of different size) - #60491 (std: Update compiler-builtins crate) - #60550 (Add tests for concrete const types) - #60572 (Add test for #59972) - #60627 (test for #50518) - #60634 (Document + Cleanup lang_items.rs) - #60641 (Instead of ICEing on incorrect pattern, use delay_span_bug) - #60644 (Use `delay_span_bug` for "Failed to unify obligation") Failed merges: r? @ghost
... on different platforms.
Official rustdoc of
usize::to_le_bytes
displays signature
which might be misleading: this function returns 4 bytes on 32-bit
systems.
With this commit applied rustdoc for
isize
andusize
is this: