[BitwiseCopyable] Deprecate unbound overloads.

The unconstrained overloads of loadUnaligned and storeBytes were
deprecated in SE-0426.
This commit is contained in:
Nate Chandler
2024-04-24 16:38:41 -07:00
parent f9ad81e106
commit b12def9c6a
3 changed files with 18 additions and 0 deletions

View File

@@ -389,6 +389,9 @@ extension Slice where Base == UnsafeMutableRawBufferPointer {
}
@inlinable
@_alwaysEmitIntoClient
@available(swift, deprecated: 6, message:
"Use the BitwiseCopyable-constrained overload"
)
public func loadUnaligned<T>(
fromByteOffset offset: Int = 0,
as type: T.Type
@@ -626,6 +629,9 @@ extension Slice where Base == UnsafeRawBufferPointer {
}
@inlinable
@_alwaysEmitIntoClient
@available(swift, deprecated: 6, message:
"Use the BitwiseCopyable-constrained overload"
)
public func loadUnaligned<T>(
fromByteOffset offset: Int = 0,
as type: T.Type

View File

@@ -450,6 +450,9 @@ extension Unsafe${Mutable}RawBufferPointer {
}
@_alwaysEmitIntoClient
@available(swift, deprecated: 6, message:
"Use the BitwiseCopyable-constrained overload"
)
public func loadUnaligned<T>(
fromByteOffset offset: Int = 0,
as type: T.Type

View File

@@ -510,6 +510,9 @@ extension UnsafeRawPointer {
/// with the value in the range of memory referenced by this pointer.
@inlinable
@_alwaysEmitIntoClient
@available(swift, deprecated: 6, message:
"Use the BitwiseCopyable-constrained overload"
)
public func loadUnaligned<T>(
fromByteOffset offset: Int = 0,
as type: T.Type
@@ -1341,6 +1344,9 @@ extension UnsafeMutableRawPointer {
/// with the value in the range of memory referenced by this pointer.
@inlinable
@_alwaysEmitIntoClient
@available(swift, deprecated: 6, message:
"Use the BitwiseCopyable-constrained overload"
)
public func loadUnaligned<T>(
fromByteOffset offset: Int = 0,
as type: T.Type
@@ -1444,6 +1450,9 @@ extension UnsafeMutableRawPointer {
@_alwaysEmitIntoClient
// This custom silgen name is chosen to not interfere with the old ABI
@_silgen_name("_swift_se0349_UnsafeMutableRawPointer_storeBytes")
@available(swift, deprecated: 6, message:
"Use the BitwiseCopyable-constrained overload"
)
public func storeBytes<T>(
of value: T, toByteOffset offset: Int = 0, as type: T.Type
) {