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-09-22 23:12:29 -0700
committerScott McMurray <scottmcm@users.noreply.github.com>2022-09-22 23:12:29 -0700
commit44b4ce1d61206dcb5351644ceeac2490f60fc512 (patch)
treeb9cd50ef8396422394a8d46eb1af5f3cb8ff7cee /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
parentc773c134c949661874d76313280e76cc3dd60975 (diff)
downloadrust-44b4ce1d61206dcb5351644ceeac2490f60fc512.tar.gz
rust-44b4ce1d61206dcb5351644ceeac2490f60fc512.zip
Make ZST checks in core/alloc more readable
There's a bunch of these checks because of special handing for ZSTs in various unsafe implementations of stuff.

This lets them be `T::IS_ZST` instead of `mem::size_of::<T>() == 0` every time, making them both more readable and more terse.

*Not* proposed for stabilization at this time.  Would be `pub(crate)` except `alloc` wants to use it too.

(And while it doesn't matter now, if we ever get something like 85836 making it a const can help codegen be simpler.)
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions