bors e58621a4a3 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.)
2022-09-25 01:20:11 +00:00
..
2022-09-16 12:08:45 +08:00
2022-09-16 11:48:42 +08:00
2022-09-24 12:12:41 -07:00
2022-09-23 20:17:31 +02:00
2022-09-19 15:07:12 +02:00
2022-09-22 02:12:06 -04:00
2022-09-16 11:48:42 +08:00
2022-09-16 11:48:43 +08:00
2022-09-23 13:42:31 +02:00
2022-09-21 16:20:15 +02:00
2022-09-23 20:17:31 +02:00
2022-09-23 20:17:31 +02:00