Skip to content

Commit d385d42

Browse files
committed
also mention 'static's as a possible base for place projections
1 parent 687faf9 commit d385d42

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/behavior-considered-undefined.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ The span of bytes a pointer or reference "points to" is determined by the pointe
7878
A place is said to be "based on a misaligned pointer" if the last `*` projection
7979
during place computation was performed on a pointer that was not aligned for its
8080
type. (If there is no `*` projection in the place expression, then this is
81-
accessing the field of a local and rustc will guarantee proper alignment. If
81+
accessing the field of a local or `static` and rustc will guarantee proper alignment. If
8282
there are multiple `*` projection, then each of them incurs a load of the
8383
pointer-to-be-dereferenced itself from memory, and each of these loads is
8484
subject to the alignment constraint. Note that some `*` projections can be

0 commit comments

Comments
 (0)