From e47d14acfb9ec827d99bcd024bd5ccc842c51b1f Mon Sep 17 00:00:00 2001 From: Guillaume Lessard Date: Mon, 20 Sep 2021 17:41:16 -0600 Subject: [PATCH] Update Sources/Atomics/AtomicOptionalRawRepresentable.swift state the layout compatibility guarantee Co-authored-by: Karoy Lorentey --- Sources/Atomics/AtomicOptionalRawRepresentable.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/Sources/Atomics/AtomicOptionalRawRepresentable.swift b/Sources/Atomics/AtomicOptionalRawRepresentable.swift index c95dcc5..078fb2d 100644 --- a/Sources/Atomics/AtomicOptionalRawRepresentable.swift +++ b/Sources/Atomics/AtomicOptionalRawRepresentable.swift @@ -44,6 +44,7 @@ public struct AtomicOptionalRawRepresentableStorage: AtomicStorage static func _extract( _ ptr: UnsafeMutablePointer ) -> UnsafeMutablePointer { + // `Self` is layout-compatible with its only stored property. return UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: Storage.self) }