@@ -2203,6 +2203,7 @@ public struct Data : Equatable, Hashable, RandomAccessCollection, MutableCollect
22032203 return try _representation. withUnsafeBytes ( body)
22042204 }
22052205
2206+ #if !os(Windows)
22062207 @available ( FoundationSpan 6 . 2 , * )
22072208 public var bytes : RawSpan {
22082209 @lifetime ( borrow self)
@@ -2239,6 +2240,7 @@ public struct Data : Equatable, Hashable, RandomAccessCollection, MutableCollect
22392240 }
22402241 }
22412242
2243+ #if compiler(>=6.2)
22422244 @available ( FoundationSpan 6 . 2 , * )
22432245 public var mutableBytes : MutableRawSpan {
22442246 @lifetime ( & self )
@@ -2298,6 +2300,8 @@ public struct Data : Equatable, Hashable, RandomAccessCollection, MutableCollect
22982300#endif
22992301 }
23002302 }
2303+ #endif // compiler(>=6.2)
2304+ #endif // !os(Windows)
23012305
23022306 @_alwaysEmitIntoClient
23032307 public func withContiguousStorageIfAvailable< ResultType> ( _ body: ( _ buffer: UnsafeBufferPointer < UInt8 > ) throws -> ResultType ) rethrows -> ResultType ? {
@@ -2950,7 +2954,7 @@ extension Data : Codable {
29502954}
29512955
29522956// TODO: remove once _overrideLifetime is public in the standard library
2953-
2957+ #if !os(Windows)
29542958/// Unsafely discard any lifetime dependency on the `dependent` argument. Return
29552959/// a value identical to `dependent` with a lifetime dependency on the caller's
29562960/// borrow scope of the `source` argument.
@@ -2964,8 +2968,6 @@ internal func _overrideLifetime<
29642968> (
29652969 _ dependent: consuming T , borrowing source: borrowing U
29662970) -> T {
2967- // TODO: Remove @_unsafeNonescapableResult. Instead, the unsafe dependence
2968- // should be expressed by a builtin that is hidden within the function body.
29692971 dependent
29702972}
29712973
@@ -2982,8 +2984,6 @@ internal func _overrideLifetime<
29822984> (
29832985 _ dependent: consuming T , copying source: borrowing U
29842986) -> T {
2985- // TODO: Remove @_unsafeNonescapableResult. Instead, the unsafe dependence
2986- // should be expressed by a builtin that is hidden within the function body.
29872987 dependent
29882988}
29892989
@@ -3001,7 +3001,6 @@ internal func _overrideLifetime<
30013001 _ dependent: consuming T ,
30023002 mutating source: inout U
30033003) -> T {
3004- // TODO: Remove @_unsafeNonescapableResult. Instead, the unsafe dependence
3005- // should be expressed by a builtin that is hidden within the function body.
30063004 dependent
30073005}
3006+ #endif
0 commit comments