Cleanup: Share DST size/align computation logic between codegen backends (and interpreter) #103728
Labels
A-codegen
Area: Code generation
A-const-eval
Area: Constant evaluation, covers all const contexts (static, const fn, ...)
A-cranelift
Things relevant to the [future] cranelift backend
C-cleanup
Category: PRs that clean code up or issues documenting cleanup.
Currently, each codegen backend and the MIR interpreter needs to re-implement this logic:
rust/compiler/rustc_codegen_ssa/src/glue.rs
Line 11 in 50f6a9e
rust/compiler/rustc_codegen_cranelift/src/unsize.rs
Line 190 in e54a13f
rust/compiler/rustc_const_eval/src/interpret/eval_context.rs
Line 570 in fd59d44
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.
Cc @bjorn3 @eddyb
The text was updated successfully, but these errors were encountered: