Skip to content

Commit 1d941cd

Browse files
committed
Note that rawLayout movesAsLike should be initialized
1 parent a9da08c commit 1d941cd

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

docs/ReferenceGuides/UnderscoredAttributes.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -962,7 +962,9 @@ the memory of the annotated type:
962962
implemented in C as always requiring a fixed address. However, you can provide
963963
`movesAsLike` to the `like:` version of this attribute to enforce that moving
964964
the value will defer its move semantics to the type it's like. This makes it
965-
suitable for storing such values that are not bitwise-movable.
965+
suitable for storing such values that are not bitwise-movable. Note that the
966+
raw storage for this variant must always be properly initialized after
967+
initialization because foreign moves will assume an initialized state.
966968

967969
Using the `@_rawLayout` attribute will suppress the annotated type from
968970
being implicitly `Sendable`. If the type is safe to access across threads, it

0 commit comments

Comments
 (0)