rust/library/alloc
Scott McMurray 44b4ce1d61 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.)
2022-09-22 23:12:29 -07:00
..
benches Optimized vec::IntoIter::next_chunk impl 2022-07-26 20:31:43 +02:00
src Make ZST checks in core/alloc more readable 2022-09-22 23:12:29 -07: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