diff options
| author | Scott McMurray <scottmcm@users.noreply.github.com> | 2022-09-22 23:12:29 -0700 |
|---|---|---|
| committer | Scott McMurray <scottmcm@users.noreply.github.com> | 2022-09-22 23:12:29 -0700 |
| commit | 44b4ce1d61206dcb5351644ceeac2490f60fc512 (patch) | |
| tree | b9cd50ef8396422394a8d46eb1af5f3cb8ff7cee /compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp | |
| parent | c773c134c949661874d76313280e76cc3dd60975 (diff) | |
| download | rust-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/PassWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
