about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
diff options
context:
space:
mode:
authorScott McMurray <scottmcm@users.noreply.github.com>2022-03-27 00:06:26 -0700
committerScott McMurray <scottmcm@users.noreply.github.com>2022-04-08 20:17:38 -0700
commitfe0c08a4f24ff7e6fb03b61656436bfa5ff29ac7 (patch)
tree1d767c6d460f1fd8b6eb76f32cca54d33e445fda /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
parent185a3f0a112fd6439247cf15452d0c5dfb3c8c92 (diff)
downloadrust-fe0c08a4f24ff7e6fb03b61656436bfa5ff29ac7.tar.gz
rust-fe0c08a4f24ff7e6fb03b61656436bfa5ff29ac7.zip
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`.
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions