Skip to content

Commit

Permalink
also mention 'static's as a possible base for place projections
Browse files Browse the repository at this point in the history
  • Loading branch information
RalfJung committed Sep 9, 2024
1 parent 687faf9 commit d385d42
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/behavior-considered-undefined.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ The span of bytes a pointer or reference "points to" is determined by the pointe
A place is said to be "based on a misaligned pointer" if the last `*` projection
during place computation was performed on a pointer that was not aligned for its
type. (If there is no `*` projection in the place expression, then this is
accessing the field of a local and rustc will guarantee proper alignment. If
accessing the field of a local or `static` and rustc will guarantee proper alignment. If
there are multiple `*` projection, then each of them incurs a load of the
pointer-to-be-dereferenced itself from memory, and each of these loads is
subject to the alignment constraint. Note that some `*` projections can be
Expand Down

0 comments on commit d385d42

Please sign in to comment.