Document endian conversion functions for ints#12944
Conversation
src/libstd/mem.rs
Outdated
There was a problem hiding this comment.
Also, these docs aren't necessarily built on the target machine; so I would prefer the doc string to say something more like
On little-endian targets this is a no-op, on big-endian targets the bytes are swapped.
I guess you could also mention the target on which the docs are built, but that's optional.
|
Updated diff with @huonw feedback comments |
src/libstd/mem.rs
Outdated
There was a problem hiding this comment.
This is a little ambiguous about what it's converting to, perhaps something like "Convert a little endian i16 to the host's endianness"
There was a problem hiding this comment.
I'm concerned "host" is unclear in the context of a crosscompiler -- I had originally used that wording.
Maybe "to the target's endianness"?
|
Updated diff with feedback from @alexcrichton |
Fix and rename `overflow_check_conditional` fixes rust-lang#2457 Other changes: * Limit the lint to unsigned types. * Actually check if the operands are the same rather than using only the first part of the path. * Allow the repeated expression to be anything as long as there are no side effects. changelog: Rename `overflow_check_conditional` to `panicking_overflow_check` and move to `correctness`
No description provided.