rust/library/core/src/alloc
Nicholas Nethercote f3bda74d36 Optimize Layout::array.
The current implementation is much more conservative than it needs to
be, because it's dealing with the size and alignment of a given `T`,
which are more restricted than an arbitrary `Layout`.

For example, imagine a struct with a `u32` and a `u4`. You can safely
create a `Layout { size_: 5, align_: 4 }` by hand, but
`Layout:🆕:<T>` will give `Layout { size_: 8, align_: 4}`, where the
size already has padding that accounts for the alignment. (And the
existing `debug_assert_eq!` in `Layout::array` already demonstrates that
no additional padding is required.)
2021-11-26 19:30:35 +11:00
..
global.rs Fix may not to appropriate might not or must not 2021-07-29 01:15:20 -04:00
layout.rs Optimize Layout::array. 2021-11-26 19:30:35 +11:00
mod.rs Consistent spelling of "adapter" in the standard library 2021-07-30 17:23:07 +02:00