Dylan DPC e4b4bf1535
Rollup merge of #95361 - scottmcm:valid-align, r=Mark-Simulacrum
Make non-power-of-two alignments a validity error in `Layout`

Inspired by the zulip conversation about how `Layout` should better enforce `size <= isize::MAX as usize`, this uses an N-variant enum on N-bit platforms to require at the validity level that the existing invariant of "must be a power of two" is upheld.

This was MIRI can catch it, and means there's a more-specific type for `Layout` to store than just `NonZeroUsize`.

It's left as `pub(crate)` here; a future PR could consider giving it a tracking issue for non-internal usage.
2022-04-09 18:26:25 +02:00
..
2022-02-02 23:07:02 +09:00
2022-03-31 11:48:51 -04:00
2022-02-10 22:10:08 +00:00
2022-02-02 23:07:02 +09:00
2022-02-25 08:00:52 -05:00
2022-02-10 22:10:08 +00:00
2022-03-03 14:54:18 -05:00