Description
Two PRs will likely land soon that change the way the Miri engine does alignment checks: #63079 and #63075.
The former entirely disables alignment checks for CTFE (when the Miri engine is used as part of compilation). The latter moves the checking of "access validity" of a pointer (non-dangling and aligned) to the moment the pointer is dereferenced (using the *
operator), as opposed to doing the checks only when a load/store actually happens.
As a consequence, the align
field of MemPlace
is now effectively dead weight in both instances of the Miri engine. However, Miri might need it again in the future if we decide to relax the rules for dereferencing pointers, which is a discussion I want to have after rust-lang/rfcs#2582. Then we should either remove the align
field for good, or try to abstract it through the Machine
trait so that CTFE does not have to carry it. Also see #63079 (comment).
Cc @oli-obk