Skip to content

Commit 83d2330

Browse files
authored
Merge pull request swiftlang#73190 from kavon/kavon/avoid-condfail-atomic
stdlib: avoid a condfail by using @_moveOnly
2 parents d86a6ad + f8213db commit 83d2330

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

stdlib/public/Synchronization/Atomic.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ import Builtin
1717
@frozen
1818
@_rawLayout(like: Value.AtomicRepresentation)
1919
@_staticExclusiveOnly
20-
public struct Atomic<Value: AtomicRepresentable>: ~Copyable {
20+
@_moveOnly
21+
public struct Atomic<Value: AtomicRepresentable> {
2122
@available(SwiftStdlib 6.0, *)
2223
@_alwaysEmitIntoClient
2324
@_transparent

stdlib/public/Synchronization/AtomicLazyReference.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@
1717
@available(SwiftStdlib 6.0, *)
1818
@frozen
1919
@_staticExclusiveOnly
20-
public struct AtomicLazyReference<Instance: AnyObject>: ~Copyable {
20+
@_moveOnly
21+
public struct AtomicLazyReference<Instance: AnyObject> {
2122
@usableFromInline
2223
let storage: Atomic<Unmanaged<Instance>?>
2324

0 commit comments

Comments
 (0)