Open
Description
openedon Dec 22, 2019
Feature const_alloc_layout
makes these methods on Layout
const:
padding_needed_for
for_value
for_value_raw
pad_to_align
array
Making more methods of alloc::Layout
const allows computing alignment/size information for arbitrary (sized) types at compile-time. While mem::size_of
and mem::align_of
are already const and Layout
is solely based on those, there is no guarantee that a const derived from these functions will be exactly the same as what is used in a call to alloc::alloc
. Constifying Layout
makes this possible.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Metadata
Assignees
Labels
Area: Custom and system allocatorsArea: const fn foo(..) {..}. Pure functions which can be applied at compile time.Category: A tracking issue for an RFC or an unstable feature.Libs issues that are tracked on the team's project board.Relevant to the library API team, which will review and decide on the PR/issue.