mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 09:14:20 +00:00
93ae6f80e3
Some masks where defined as ```rust const NONASCII_MASK: usize = 0x80808080_80808080u64 as usize; ``` where it was assumed that `usize` is never wider than 64, which is currently true. To make those constants valid in a hypothetical 128-bit target, these constants have been redefined in an `usize`-width-agnostic way ```rust const NONASCII_MASK: usize = usize::from_ne_bytes([0x80; size_of::<usize>()]); ``` There are already some cases where Rust anticipates the possibility of supporting 128-bit targets, such as not implementing `From<usize>` for `u64`. |
||
---|---|---|
.. | ||
ascii | ||
char | ||
hash | ||
num | ||
str | ||
any.rs | ||
ascii.rs | ||
fmt.rs | ||
iter.rs | ||
lib.rs | ||
ops.rs | ||
pattern.rs | ||
slice.rs | ||
str.rs |