rust/library/core
Eduardo Sánchez Muñoz 93ae6f80e3 Make some usize-typed masks definition agnostic to the size of usize
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`.
2022-04-15 17:04:59 +02:00
..
benches Make some usize-typed masks definition agnostic to the size of usize 2022-04-15 17:04:59 +02:00
primitive_docs
src Make some usize-typed masks definition agnostic to the size of usize 2022-04-15 17:04:59 +02:00
tests Auto merge of #95399 - gilescope:plan_b, r=scottmcm 2022-04-12 05:54:50 +00:00
Cargo.toml Build libcore as 2021 in a few more places 2022-02-06 15:41:01 -08:00