Skip to content

Commit 7d65170

Browse files
authored
Merge pull request #75495 from hborla/remove-redundant-sendable-stdlib
2 parents eb675c2 + dc3893d commit 7d65170

6 files changed

+0
-69
lines changed

stdlib/public/core/ContiguousArrayBuffer.swift

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,6 @@ internal final class __EmptyArrayStorage
6363
}
6464
}
6565

66-
@available(*, unavailable)
67-
extension __EmptyArrayStorage: Sendable {}
68-
6966
#if $Embedded
7067
// In embedded Swift, the stdlib is a .swiftmodule only without any .o/.a files,
7168
// to allow consuming it by clients with different LLVM codegen setting (-mcpu
@@ -120,9 +117,6 @@ internal final class __StaticArrayStorage
120117
}
121118
}
122119

123-
@available(*, unavailable)
124-
extension __StaticArrayStorage: Sendable {}
125-
126120
/// The empty array prototype. We use the same object for all empty
127121
/// `[Native]Array<Element>`s.
128122
@inlinable
@@ -312,9 +306,6 @@ internal final class _ContiguousArrayStorage<
312306
}
313307
}
314308

315-
@available(*, unavailable)
316-
extension _ContiguousArrayStorage: Sendable {}
317-
318309
@_alwaysEmitIntoClient
319310
@inline(__always)
320311
internal func _uncheckedUnsafeBitCast<T, U>(_ x: T, to type: U.Type) -> U {
@@ -977,9 +968,6 @@ internal struct _ContiguousArrayBuffer<Element>: _ArrayBufferProtocol {
977968
}
978969
}
979970

980-
@available(*, unavailable)
981-
extension _ContiguousArrayBuffer: Sendable {}
982-
983971
/// Append the elements of `rhs` to `lhs`.
984972
@inlinable
985973
internal func += <Element, C: Collection>(

stdlib/public/core/DictionaryBridging.swift

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -421,9 +421,6 @@ final internal class _SwiftDeferredNSDictionary<Key: Hashable, Value>
421421
}
422422
}
423423

424-
@available(*, unavailable)
425-
extension _SwiftDeferredNSDictionary: Sendable {}
426-
427424
// NOTE: older runtimes called this struct _CocoaDictionary. The two
428425
// must coexist without conflicting ObjC class names from the nested
429426
// classes, so it was renamed. The old names must not be used in the new

stdlib/public/core/DictionaryStorage.swift

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,6 @@ internal class __RawDictionaryStorage: __SwiftNativeNSDictionary {
110110
}
111111
}
112112

113-
@available(*, unavailable)
114-
extension __RawDictionaryStorage: Sendable {}
115-
116113
/// The storage class for the singleton empty set.
117114
/// The single instance of this class is created by the runtime.
118115
// NOTE: older runtimes called this class _EmptyDictionarySingleton.
@@ -139,9 +136,6 @@ internal class __EmptyDictionarySingleton: __RawDictionaryStorage {
139136
#endif
140137
}
141138

142-
@available(*, unavailable)
143-
extension __EmptyDictionarySingleton: Sendable {}
144-
145139
#if _runtime(_ObjC)
146140
extension __EmptyDictionarySingleton: _NSDictionaryCore {
147141
@objc(copyWithZone:)
@@ -511,6 +505,3 @@ extension _DictionaryStorage {
511505
return storage
512506
}
513507
}
514-
515-
extension _DictionaryStorage: @unchecked Sendable
516-
where Key: Sendable, Value: Sendable {}

stdlib/public/core/ExistentialCollection.swift

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -166,9 +166,6 @@ internal final class _IteratorBox<Base: IteratorProtocol>
166166
internal var _base: Base
167167
}
168168

169-
@available(*, unavailable)
170-
extension _IteratorBox: Sendable {}
171-
172169
//===--- Sequence ---------------------------------------------------------===//
173170
//===----------------------------------------------------------------------===//
174171

@@ -402,9 +399,6 @@ internal class _AnyCollectionBox<Element>: _AnySequenceBox<Element> {
402399
) -> _AnyCollectionBox<Element> { _abstract() }
403400
}
404401

405-
@available(*, unavailable)
406-
extension _AnyCollectionBox: Sendable {}
407-
408402
@_fixed_layout
409403
@usableFromInline
410404
internal class _AnyBidirectionalCollectionBox<Element>
@@ -468,9 +462,6 @@ internal class _AnyBidirectionalCollectionBox<Element>
468462
internal func _formIndex(before i: _AnyIndexBox) { _abstract() }
469463
}
470464

471-
@available(*, unavailable)
472-
extension _AnyBidirectionalCollectionBox: Sendable {}
473-
474465
@_fixed_layout
475466
@usableFromInline
476467
internal class _AnyRandomAccessCollectionBox<Element>
@@ -528,9 +519,6 @@ internal class _AnyRandomAccessCollectionBox<Element>
528519
) -> _AnyRandomAccessCollectionBox<Element> { _abstract() }
529520
}
530521

531-
@available(*, unavailable)
532-
extension _AnyRandomAccessCollectionBox: Sendable {}
533-
534522
@_fixed_layout
535523
@usableFromInline
536524
internal final class _SequenceBox<S: Sequence>: _AnySequenceBox<S.Element> {
@@ -623,9 +611,6 @@ internal final class _SequenceBox<S: Sequence>: _AnySequenceBox<S.Element> {
623611
internal var _base: S
624612
}
625613

626-
@available(*, unavailable)
627-
extension _SequenceBox: Sendable {}
628-
629614
@_fixed_layout
630615
@usableFromInline
631616
internal final class _CollectionBox<S: Collection>: _AnyCollectionBox<S.Element>
@@ -820,9 +805,6 @@ internal final class _CollectionBox<S: Collection>: _AnyCollectionBox<S.Element>
820805
internal var _base: S
821806
}
822807

823-
@available(*, unavailable)
824-
extension _CollectionBox: Sendable {}
825-
826808
@_fixed_layout
827809
@usableFromInline
828810
internal final class _BidirectionalCollectionBox<S: BidirectionalCollection>
@@ -1036,9 +1018,6 @@ internal final class _BidirectionalCollectionBox<S: BidirectionalCollection>
10361018
internal var _base: S
10371019
}
10381020

1039-
@available(*, unavailable)
1040-
extension _BidirectionalCollectionBox: Sendable {}
1041-
10421021
@_fixed_layout
10431022
@usableFromInline
10441023
internal final class _RandomAccessCollectionBox<S: RandomAccessCollection>
@@ -1251,9 +1230,6 @@ internal final class _RandomAccessCollectionBox<S: RandomAccessCollection>
12511230
internal var _base: S
12521231
}
12531232

1254-
@available(*, unavailable)
1255-
extension _RandomAccessCollectionBox: Sendable {}
1256-
12571233
@usableFromInline
12581234
@frozen
12591235
internal struct _ClosureBasedSequence<Iterator: IteratorProtocol> {

stdlib/public/core/SetStorage.swift

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,6 @@ internal class __RawSetStorage: __SwiftNativeNSSet {
105105
}
106106
}
107107

108-
@available(*, unavailable)
109-
extension __RawSetStorage: Sendable {}
110-
111108
/// The storage class for the singleton empty set.
112109
/// The single instance of this class is created by the runtime.
113110
// NOTE: older runtimes called this class _EmptySetSingleton. The two
@@ -130,9 +127,6 @@ internal class __EmptySetSingleton: __RawSetStorage {
130127
#endif
131128
}
132129

133-
@available(*, unavailable)
134-
extension __EmptySetSingleton: Sendable {}
135-
136130
#if $Embedded
137131
// In embedded Swift, the stdlib is a .swiftmodule only without any .o/.a files,
138132
// to allow consuming it by clients with different LLVM codegen setting (-mcpu
@@ -316,9 +310,6 @@ final internal class _SetStorage<Element: Hashable>
316310
#endif
317311
}
318312

319-
@available(*, unavailable)
320-
extension _SetStorage: Sendable {}
321-
322313
extension _SetStorage {
323314
@usableFromInline
324315
@_effects(releasenone)

stdlib/public/core/SwiftNativeNSArray.swift

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,6 @@ internal class __SwiftNativeNSArrayWithContiguousStorage
6161
}
6262
}
6363

64-
@available(*, unavailable)
65-
extension __SwiftNativeNSArrayWithContiguousStorage: Sendable {}
66-
6764
private let NSNotFound: Int = .max
6865

6966
// Implement the APIs required by NSArray
@@ -325,9 +322,6 @@ extension __SwiftNativeNSArrayWithContiguousStorage {
325322
}
326323
}
327324

328-
@available(*, unavailable)
329-
extension _SwiftNSMutableArray: Sendable {}
330-
331325
/// An `NSArray` whose contiguous storage is created and filled, upon
332326
/// first access, by bridging the elements of a Swift `Array`.
333327
///
@@ -435,9 +429,6 @@ extension _SwiftNSMutableArray: Sendable {}
435429
}
436430
}
437431

438-
@available(*, unavailable)
439-
extension __SwiftDeferredNSArray: Sendable {}
440-
441432
/// A `__SwiftDeferredNSArray` which is used for static read-only Swift Arrays.
442433
///
443434
/// In contrast to its base class, `__SwiftDeferredStaticNSArray` is generic
@@ -593,6 +584,3 @@ internal class __ContiguousArrayStorageBase
593584
self !== _emptyArrayStorage, "Deallocating empty array storage?!")
594585
}
595586
}
596-
597-
@available(*, unavailable)
598-
extension __ContiguousArrayStorageBase: Sendable {}

0 commit comments

Comments
 (0)