From d385d421e3f450b2da4aaed4166f59598a26dd2a Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Mon, 9 Sep 2024 17:36:26 +0200 Subject: [PATCH] also mention 'static's as a possible base for place projections --- src/behavior-considered-undefined.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/behavior-considered-undefined.md b/src/behavior-considered-undefined.md index e60fe473a..63fa28f63 100644 --- a/src/behavior-considered-undefined.md +++ b/src/behavior-considered-undefined.md @@ -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