-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Open
Labels
A-codegenArea: Code generationArea: Code generationA-const-evalArea: Constant evaluation, covers all const contexts (static, const fn, ...)Area: Constant evaluation, covers all const contexts (static, const fn, ...)A-craneliftThings relevant to the [future] cranelift backendThings relevant to the [future] cranelift backendC-cleanupCategory: PRs that clean code up or issues documenting cleanup.Category: PRs that clean code up or issues documenting cleanup.
Description
Currently, each codegen backend and the MIR interpreter needs to re-implement this logic:
pub fn size_and_align_of_dst<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>>( |
pub(crate) fn size_and_align_of_dst<'tcx>( |
pub(super) fn size_and_align_of( |
Turns out the interpreter version actually has a bug. Ideally we'd only have this logic once so that we don't need the same subtle logic in multiple places.
Metadata
Metadata
Assignees
Labels
A-codegenArea: Code generationArea: Code generationA-const-evalArea: Constant evaluation, covers all const contexts (static, const fn, ...)Area: Constant evaluation, covers all const contexts (static, const fn, ...)A-craneliftThings relevant to the [future] cranelift backendThings relevant to the [future] cranelift backendC-cleanupCategory: PRs that clean code up or issues documenting cleanup.Category: PRs that clean code up or issues documenting cleanup.