diff options
| author | Dylan DPC <99973273+Dylan-DPC@users.noreply.github.com> | 2022-04-09 18:26:25 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-04-09 18:26:25 +0200 |
| commit | e4b4bf1535ab3539c4573c8d960214c6e49eb138 (patch) | |
| tree | 4d1f4e3804268b1973d078805dc4f6537473cc99 /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp | |
| parent | 1ced0b61a43d67ef209fc2fa8c4da783daa2471e (diff) | |
| parent | fe0c08a4f24ff7e6fb03b61656436bfa5ff29ac7 (diff) | |
| download | rust-e4b4bf1535ab3539c4573c8d960214c6e49eb138.tar.gz rust-e4b4bf1535ab3539c4573c8d960214c6e49eb138.zip | |
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.
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
