@@ -2239,6 +2239,7 @@ public struct Data : Equatable, Hashable, RandomAccessCollection, MutableCollect
22392239 }
22402240 }
22412241
2242+ #if $LifetimeDependenceMutableAccessors && !os(Windows)
22422243 @available ( FoundationSpan 6 . 2 , * )
22432244 public var mutableBytes : MutableRawSpan {
22442245 @lifetime ( & self )
@@ -2298,6 +2299,7 @@ public struct Data : Equatable, Hashable, RandomAccessCollection, MutableCollect
22982299#endif
22992300 }
23002301 }
2302+ #endif // $LifetimeDependenceMutableAccessors && !os(Windows)
23012303
23022304 @_alwaysEmitIntoClient
23032305 public func withContiguousStorageIfAvailable< ResultType> ( _ body: ( _ buffer: UnsafeBufferPointer < UInt8 > ) throws -> ResultType ) rethrows -> ResultType ? {
@@ -2950,7 +2952,7 @@ extension Data : Codable {
29502952}
29512953
29522954// TODO: remove once _overrideLifetime is public in the standard library
2953-
2955+ #if $LifetimeDependenceMutableAccessors && !os(Windows)
29542956/// Unsafely discard any lifetime dependency on the `dependent` argument. Return
29552957/// a value identical to `dependent` with a lifetime dependency on the caller's
29562958/// borrow scope of the `source` argument.
@@ -2964,8 +2966,6 @@ internal func _overrideLifetime<
29642966> (
29652967 _ dependent: consuming T , borrowing source: borrowing U
29662968) -> T {
2967- // TODO: Remove @_unsafeNonescapableResult. Instead, the unsafe dependence
2968- // should be expressed by a builtin that is hidden within the function body.
29692969 dependent
29702970}
29712971
@@ -2982,8 +2982,6 @@ internal func _overrideLifetime<
29822982> (
29832983 _ dependent: consuming T , copying source: borrowing U
29842984) -> T {
2985- // TODO: Remove @_unsafeNonescapableResult. Instead, the unsafe dependence
2986- // should be expressed by a builtin that is hidden within the function body.
29872985 dependent
29882986}
29892987
@@ -3001,7 +2999,6 @@ internal func _overrideLifetime<
30012999 _ dependent: consuming T ,
30023000 mutating source: inout U
30033001) -> T {
3004- // TODO: Remove @_unsafeNonescapableResult. Instead, the unsafe dependence
3005- // should be expressed by a builtin that is hidden within the function body.
30063002 dependent
30073003}
3004+ #endif
0 commit comments