about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-09-25 01:20:11 +0000
committerbors <bors@rust-lang.org>2022-09-25 01:20:11 +0000
commite58621a4a30db1ae7fcc041e108042c1ce14d3bd (patch)
tree33760c640b00c3da05393bf7abdba7751e04fcee /compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp
parentd0ece44cfa3be0f2edfebe286d61f15b8affa0c6 (diff)
parented16dbf65e55c54a6cb5eb2596a46a6639428370 (diff)
downloadrust-e58621a4a30db1ae7fcc041e108042c1ce14d3bd.tar.gz
rust-e58621a4a30db1ae7fcc041e108042c1ce14d3bd.zip
Auto merge of #102169 - scottmcm:constify-some-conditions, r=thomcc
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.  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