Skip to content

Commit adbf8d2

Browse files
committed
Add availability attributes to Sendable conformances
1 parent a87eaf7 commit adbf8d2

File tree

5 files changed

+15
-0
lines changed

5 files changed

+15
-0
lines changed

Sources/System/FileDescriptor.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,12 @@ extension FileDescriptor.OpenOptions
481481
//@available(*, unavailable, message: "File descriptors are not completely thread-safe.")
482482
//extension FileDescriptor: Sendable {}
483483

484+
@available(/*System 0.0.1: macOS 11.0, iOS 14.0, watchOS 7.0, tvOS 14.0*/iOS 8, *)
484485
extension FileDescriptor.AccessMode: Sendable {}
486+
487+
@available(/*System 0.0.1: macOS 11.0, iOS 14.0, watchOS 7.0, tvOS 14.0*/iOS 8, *)
485488
extension FileDescriptor.OpenOptions: Sendable {}
489+
490+
@available(/*System 0.0.1: macOS 11.0, iOS 14.0, watchOS 7.0, tvOS 14.0*/iOS 8, *)
486491
extension FileDescriptor.SeekOrigin: Sendable {}
487492
#endif

Sources/System/FilePath/FilePath.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,5 +69,6 @@ extension FilePath {
6969
extension FilePath: Hashable, Codable {}
7070

7171
#if compiler(>=5.5) && canImport(_Concurrency)
72+
@available(/*System 0.0.1: macOS 11.0, iOS 14.0, watchOS 7.0, tvOS 14.0*/iOS 8, *)
7273
extension FilePath: Sendable {}
7374
#endif

Sources/System/FilePath/FilePathComponentView.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,9 @@ extension FilePath.ComponentView {
241241
}
242242

243243
#if compiler(>=5.5) && canImport(_Concurrency)
244+
@available(/*System 0.0.2: macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0*/iOS 8, *)
244245
extension FilePath.ComponentView: Sendable {}
246+
247+
@available(/*System 0.0.2: macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0*/iOS 8, *)
245248
extension FilePath.ComponentView.Index: Sendable {}
246249
#endif

Sources/System/FilePath/FilePathComponents.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,12 @@ extension FilePath.Root {
287287
}
288288

289289
#if compiler(>=5.5) && canImport(_Concurrency)
290+
@available(/*System 0.0.2: macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0*/iOS 8, *)
290291
extension FilePath.Root: Sendable {}
292+
293+
@available(/*System 0.0.2: macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0*/iOS 8, *)
291294
extension FilePath.Component: Sendable {}
295+
296+
@available(/*System 0.0.2: macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0*/iOS 8, *)
292297
extension FilePath.Component.Kind: Sendable {}
293298
#endif

Sources/System/FilePermissions.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,5 +177,6 @@ extension FilePermissions
177177
}
178178

179179
#if compiler(>=5.5) && canImport(_Concurrency)
180+
@available(/*System 0.0.1: macOS 11.0, iOS 14.0, watchOS 7.0, tvOS 14.0*/iOS 8, *)
180181
extension FilePermissions: Sendable {}
181182
#endif

0 commit comments

Comments
 (0)