@@ -2239,6 +2239,7 @@ public struct Data : Equatable, Hashable, RandomAccessCollection, MutableCollect
2239
2239
}
2240
2240
}
2241
2241
2242
+ #if $LifetimeDependenceMutableAccessors && !os(Windows)
2242
2243
@available ( FoundationSpan 6 . 2 , * )
2243
2244
public var mutableBytes : MutableRawSpan {
2244
2245
@lifetime ( & self )
@@ -2298,6 +2299,7 @@ public struct Data : Equatable, Hashable, RandomAccessCollection, MutableCollect
2298
2299
#endif
2299
2300
}
2300
2301
}
2302
+ #endif // $LifetimeDependenceMutableAccessors && !os(Windows)
2301
2303
2302
2304
@_alwaysEmitIntoClient
2303
2305
public func withContiguousStorageIfAvailable< ResultType> ( _ body: ( _ buffer: UnsafeBufferPointer < UInt8 > ) throws -> ResultType ) rethrows -> ResultType ? {
@@ -2950,7 +2952,7 @@ extension Data : Codable {
2950
2952
}
2951
2953
2952
2954
// TODO: remove once _overrideLifetime is public in the standard library
2953
-
2955
+ #if $LifetimeDependenceMutableAccessors && !os(Windows)
2954
2956
/// Unsafely discard any lifetime dependency on the `dependent` argument. Return
2955
2957
/// a value identical to `dependent` with a lifetime dependency on the caller's
2956
2958
/// borrow scope of the `source` argument.
@@ -2964,8 +2966,6 @@ internal func _overrideLifetime<
2964
2966
> (
2965
2967
_ dependent: consuming T , borrowing source: borrowing U
2966
2968
) -> T {
2967
- // TODO: Remove @_unsafeNonescapableResult. Instead, the unsafe dependence
2968
- // should be expressed by a builtin that is hidden within the function body.
2969
2969
dependent
2970
2970
}
2971
2971
@@ -2982,8 +2982,6 @@ internal func _overrideLifetime<
2982
2982
> (
2983
2983
_ dependent: consuming T , copying source: borrowing U
2984
2984
) -> T {
2985
- // TODO: Remove @_unsafeNonescapableResult. Instead, the unsafe dependence
2986
- // should be expressed by a builtin that is hidden within the function body.
2987
2985
dependent
2988
2986
}
2989
2987
@@ -3001,7 +2999,6 @@ internal func _overrideLifetime<
3001
2999
_ dependent: consuming T ,
3002
3000
mutating source: inout U
3003
3001
) -> T {
3004
- // TODO: Remove @_unsafeNonescapableResult. Instead, the unsafe dependence
3005
- // should be expressed by a builtin that is hidden within the function body.
3006
3002
dependent
3007
3003
}
3004
+ #endif
0 commit comments