mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[Concurrency] Remove redundant Sendable conformances in the standard library.
These conformances are all redundant because the `Sendable` conformance is inherited from a superclass.
This commit is contained in:
@@ -63,9 +63,6 @@ internal final class __EmptyArrayStorage
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@available(*, unavailable)
|
|
||||||
extension __EmptyArrayStorage: Sendable {}
|
|
||||||
|
|
||||||
#if $Embedded
|
#if $Embedded
|
||||||
// In embedded Swift, the stdlib is a .swiftmodule only without any .o/.a files,
|
// In embedded Swift, the stdlib is a .swiftmodule only without any .o/.a files,
|
||||||
// to allow consuming it by clients with different LLVM codegen setting (-mcpu
|
// to allow consuming it by clients with different LLVM codegen setting (-mcpu
|
||||||
@@ -120,9 +117,6 @@ internal final class __StaticArrayStorage
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@available(*, unavailable)
|
|
||||||
extension __StaticArrayStorage: Sendable {}
|
|
||||||
|
|
||||||
/// The empty array prototype. We use the same object for all empty
|
/// The empty array prototype. We use the same object for all empty
|
||||||
/// `[Native]Array<Element>`s.
|
/// `[Native]Array<Element>`s.
|
||||||
@inlinable
|
@inlinable
|
||||||
@@ -312,9 +306,6 @@ internal final class _ContiguousArrayStorage<
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@available(*, unavailable)
|
|
||||||
extension _ContiguousArrayStorage: Sendable {}
|
|
||||||
|
|
||||||
@_alwaysEmitIntoClient
|
@_alwaysEmitIntoClient
|
||||||
@inline(__always)
|
@inline(__always)
|
||||||
internal func _uncheckedUnsafeBitCast<T, U>(_ x: T, to type: U.Type) -> U {
|
internal func _uncheckedUnsafeBitCast<T, U>(_ x: T, to type: U.Type) -> U {
|
||||||
@@ -977,9 +968,6 @@ internal struct _ContiguousArrayBuffer<Element>: _ArrayBufferProtocol {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@available(*, unavailable)
|
|
||||||
extension _ContiguousArrayBuffer: Sendable {}
|
|
||||||
|
|
||||||
/// Append the elements of `rhs` to `lhs`.
|
/// Append the elements of `rhs` to `lhs`.
|
||||||
@inlinable
|
@inlinable
|
||||||
internal func += <Element, C: Collection>(
|
internal func += <Element, C: Collection>(
|
||||||
|
|||||||
@@ -421,9 +421,6 @@ final internal class _SwiftDeferredNSDictionary<Key: Hashable, Value>
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@available(*, unavailable)
|
|
||||||
extension _SwiftDeferredNSDictionary: Sendable {}
|
|
||||||
|
|
||||||
// NOTE: older runtimes called this struct _CocoaDictionary. The two
|
// NOTE: older runtimes called this struct _CocoaDictionary. The two
|
||||||
// must coexist without conflicting ObjC class names from the nested
|
// must coexist without conflicting ObjC class names from the nested
|
||||||
// classes, so it was renamed. The old names must not be used in the new
|
// classes, so it was renamed. The old names must not be used in the new
|
||||||
|
|||||||
@@ -110,9 +110,6 @@ internal class __RawDictionaryStorage: __SwiftNativeNSDictionary {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@available(*, unavailable)
|
|
||||||
extension __RawDictionaryStorage: Sendable {}
|
|
||||||
|
|
||||||
/// The storage class for the singleton empty set.
|
/// The storage class for the singleton empty set.
|
||||||
/// The single instance of this class is created by the runtime.
|
/// The single instance of this class is created by the runtime.
|
||||||
// NOTE: older runtimes called this class _EmptyDictionarySingleton.
|
// NOTE: older runtimes called this class _EmptyDictionarySingleton.
|
||||||
@@ -139,9 +136,6 @@ internal class __EmptyDictionarySingleton: __RawDictionaryStorage {
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@available(*, unavailable)
|
|
||||||
extension __EmptyDictionarySingleton: Sendable {}
|
|
||||||
|
|
||||||
#if _runtime(_ObjC)
|
#if _runtime(_ObjC)
|
||||||
extension __EmptyDictionarySingleton: _NSDictionaryCore {
|
extension __EmptyDictionarySingleton: _NSDictionaryCore {
|
||||||
@objc(copyWithZone:)
|
@objc(copyWithZone:)
|
||||||
@@ -511,6 +505,3 @@ extension _DictionaryStorage {
|
|||||||
return storage
|
return storage
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
extension _DictionaryStorage: @unchecked Sendable
|
|
||||||
where Key: Sendable, Value: Sendable {}
|
|
||||||
|
|||||||
@@ -166,9 +166,6 @@ internal final class _IteratorBox<Base: IteratorProtocol>
|
|||||||
internal var _base: Base
|
internal var _base: Base
|
||||||
}
|
}
|
||||||
|
|
||||||
@available(*, unavailable)
|
|
||||||
extension _IteratorBox: Sendable {}
|
|
||||||
|
|
||||||
//===--- Sequence ---------------------------------------------------------===//
|
//===--- Sequence ---------------------------------------------------------===//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
@@ -402,9 +399,6 @@ internal class _AnyCollectionBox<Element>: _AnySequenceBox<Element> {
|
|||||||
) -> _AnyCollectionBox<Element> { _abstract() }
|
) -> _AnyCollectionBox<Element> { _abstract() }
|
||||||
}
|
}
|
||||||
|
|
||||||
@available(*, unavailable)
|
|
||||||
extension _AnyCollectionBox: Sendable {}
|
|
||||||
|
|
||||||
@_fixed_layout
|
@_fixed_layout
|
||||||
@usableFromInline
|
@usableFromInline
|
||||||
internal class _AnyBidirectionalCollectionBox<Element>
|
internal class _AnyBidirectionalCollectionBox<Element>
|
||||||
@@ -468,9 +462,6 @@ internal class _AnyBidirectionalCollectionBox<Element>
|
|||||||
internal func _formIndex(before i: _AnyIndexBox) { _abstract() }
|
internal func _formIndex(before i: _AnyIndexBox) { _abstract() }
|
||||||
}
|
}
|
||||||
|
|
||||||
@available(*, unavailable)
|
|
||||||
extension _AnyBidirectionalCollectionBox: Sendable {}
|
|
||||||
|
|
||||||
@_fixed_layout
|
@_fixed_layout
|
||||||
@usableFromInline
|
@usableFromInline
|
||||||
internal class _AnyRandomAccessCollectionBox<Element>
|
internal class _AnyRandomAccessCollectionBox<Element>
|
||||||
@@ -528,9 +519,6 @@ internal class _AnyRandomAccessCollectionBox<Element>
|
|||||||
) -> _AnyRandomAccessCollectionBox<Element> { _abstract() }
|
) -> _AnyRandomAccessCollectionBox<Element> { _abstract() }
|
||||||
}
|
}
|
||||||
|
|
||||||
@available(*, unavailable)
|
|
||||||
extension _AnyRandomAccessCollectionBox: Sendable {}
|
|
||||||
|
|
||||||
@_fixed_layout
|
@_fixed_layout
|
||||||
@usableFromInline
|
@usableFromInline
|
||||||
internal final class _SequenceBox<S: Sequence>: _AnySequenceBox<S.Element> {
|
internal final class _SequenceBox<S: Sequence>: _AnySequenceBox<S.Element> {
|
||||||
@@ -623,9 +611,6 @@ internal final class _SequenceBox<S: Sequence>: _AnySequenceBox<S.Element> {
|
|||||||
internal var _base: S
|
internal var _base: S
|
||||||
}
|
}
|
||||||
|
|
||||||
@available(*, unavailable)
|
|
||||||
extension _SequenceBox: Sendable {}
|
|
||||||
|
|
||||||
@_fixed_layout
|
@_fixed_layout
|
||||||
@usableFromInline
|
@usableFromInline
|
||||||
internal final class _CollectionBox<S: Collection>: _AnyCollectionBox<S.Element>
|
internal final class _CollectionBox<S: Collection>: _AnyCollectionBox<S.Element>
|
||||||
@@ -820,9 +805,6 @@ internal final class _CollectionBox<S: Collection>: _AnyCollectionBox<S.Element>
|
|||||||
internal var _base: S
|
internal var _base: S
|
||||||
}
|
}
|
||||||
|
|
||||||
@available(*, unavailable)
|
|
||||||
extension _CollectionBox: Sendable {}
|
|
||||||
|
|
||||||
@_fixed_layout
|
@_fixed_layout
|
||||||
@usableFromInline
|
@usableFromInline
|
||||||
internal final class _BidirectionalCollectionBox<S: BidirectionalCollection>
|
internal final class _BidirectionalCollectionBox<S: BidirectionalCollection>
|
||||||
@@ -1036,9 +1018,6 @@ internal final class _BidirectionalCollectionBox<S: BidirectionalCollection>
|
|||||||
internal var _base: S
|
internal var _base: S
|
||||||
}
|
}
|
||||||
|
|
||||||
@available(*, unavailable)
|
|
||||||
extension _BidirectionalCollectionBox: Sendable {}
|
|
||||||
|
|
||||||
@_fixed_layout
|
@_fixed_layout
|
||||||
@usableFromInline
|
@usableFromInline
|
||||||
internal final class _RandomAccessCollectionBox<S: RandomAccessCollection>
|
internal final class _RandomAccessCollectionBox<S: RandomAccessCollection>
|
||||||
@@ -1251,9 +1230,6 @@ internal final class _RandomAccessCollectionBox<S: RandomAccessCollection>
|
|||||||
internal var _base: S
|
internal var _base: S
|
||||||
}
|
}
|
||||||
|
|
||||||
@available(*, unavailable)
|
|
||||||
extension _RandomAccessCollectionBox: Sendable {}
|
|
||||||
|
|
||||||
@usableFromInline
|
@usableFromInline
|
||||||
@frozen
|
@frozen
|
||||||
internal struct _ClosureBasedSequence<Iterator: IteratorProtocol> {
|
internal struct _ClosureBasedSequence<Iterator: IteratorProtocol> {
|
||||||
|
|||||||
@@ -105,9 +105,6 @@ internal class __RawSetStorage: __SwiftNativeNSSet {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@available(*, unavailable)
|
|
||||||
extension __RawSetStorage: Sendable {}
|
|
||||||
|
|
||||||
/// The storage class for the singleton empty set.
|
/// The storage class for the singleton empty set.
|
||||||
/// The single instance of this class is created by the runtime.
|
/// The single instance of this class is created by the runtime.
|
||||||
// NOTE: older runtimes called this class _EmptySetSingleton. The two
|
// NOTE: older runtimes called this class _EmptySetSingleton. The two
|
||||||
@@ -130,9 +127,6 @@ internal class __EmptySetSingleton: __RawSetStorage {
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@available(*, unavailable)
|
|
||||||
extension __EmptySetSingleton: Sendable {}
|
|
||||||
|
|
||||||
#if $Embedded
|
#if $Embedded
|
||||||
// In embedded Swift, the stdlib is a .swiftmodule only without any .o/.a files,
|
// In embedded Swift, the stdlib is a .swiftmodule only without any .o/.a files,
|
||||||
// to allow consuming it by clients with different LLVM codegen setting (-mcpu
|
// to allow consuming it by clients with different LLVM codegen setting (-mcpu
|
||||||
@@ -316,9 +310,6 @@ final internal class _SetStorage<Element: Hashable>
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@available(*, unavailable)
|
|
||||||
extension _SetStorage: Sendable {}
|
|
||||||
|
|
||||||
extension _SetStorage {
|
extension _SetStorage {
|
||||||
@usableFromInline
|
@usableFromInline
|
||||||
@_effects(releasenone)
|
@_effects(releasenone)
|
||||||
|
|||||||
@@ -61,9 +61,6 @@ internal class __SwiftNativeNSArrayWithContiguousStorage
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@available(*, unavailable)
|
|
||||||
extension __SwiftNativeNSArrayWithContiguousStorage: Sendable {}
|
|
||||||
|
|
||||||
private let NSNotFound: Int = .max
|
private let NSNotFound: Int = .max
|
||||||
|
|
||||||
// Implement the APIs required by NSArray
|
// Implement the APIs required by NSArray
|
||||||
@@ -325,9 +322,6 @@ extension __SwiftNativeNSArrayWithContiguousStorage {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@available(*, unavailable)
|
|
||||||
extension _SwiftNSMutableArray: Sendable {}
|
|
||||||
|
|
||||||
/// An `NSArray` whose contiguous storage is created and filled, upon
|
/// An `NSArray` whose contiguous storage is created and filled, upon
|
||||||
/// first access, by bridging the elements of a Swift `Array`.
|
/// first access, by bridging the elements of a Swift `Array`.
|
||||||
///
|
///
|
||||||
@@ -435,9 +429,6 @@ extension _SwiftNSMutableArray: Sendable {}
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@available(*, unavailable)
|
|
||||||
extension __SwiftDeferredNSArray: Sendable {}
|
|
||||||
|
|
||||||
/// A `__SwiftDeferredNSArray` which is used for static read-only Swift Arrays.
|
/// A `__SwiftDeferredNSArray` which is used for static read-only Swift Arrays.
|
||||||
///
|
///
|
||||||
/// In contrast to its base class, `__SwiftDeferredStaticNSArray` is generic
|
/// In contrast to its base class, `__SwiftDeferredStaticNSArray` is generic
|
||||||
@@ -593,6 +584,3 @@ internal class __ContiguousArrayStorageBase
|
|||||||
self !== _emptyArrayStorage, "Deallocating empty array storage?!")
|
self !== _emptyArrayStorage, "Deallocating empty array storage?!")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@available(*, unavailable)
|
|
||||||
extension __ContiguousArrayStorageBase: Sendable {}
|
|
||||||
|
|||||||
Reference in New Issue
Block a user