rust/library/alloc
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
..
benches Optimized vec::IntoIter::next_chunk impl 2022-07-26 20:31:43 +02:00
src Auto merge of #102169 - scottmcm:constify-some-conditions, r=thomcc 2022-09-25 01:20:11 +00:00
tests fix into_iter on ZST 2022-08-31 14:21:35 +02:00
Cargo.toml Switch all libraries to the 2021 edition 2021-12-23 19:03:47 +08:00