Skip to content

Commit c8119e3

Browse files
committed
[stdlib] FixedWidthInteger is BitwiseCopyable.
1 parent 4c5d100 commit c8119e3

File tree

4 files changed

+13
-8
lines changed

4 files changed

+13
-8
lines changed

stdlib/public/core/Integers.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1904,7 +1904,8 @@ public protocol _LosslessStringConvertibleOrNone {}
19041904
/// customization points for arithmetic operations. When you provide just those
19051905
/// methods, the standard library provides default implementations for all
19061906
/// other arithmetic methods and operators.
1907-
public protocol FixedWidthInteger: BinaryInteger, _LosslessStringConvertibleOrNone
1907+
public protocol FixedWidthInteger
1908+
: BinaryInteger, _LosslessStringConvertibleOrNone, _BitwiseCopyable
19081909
where Magnitude: FixedWidthInteger & UnsignedInteger,
19091910
Stride: FixedWidthInteger & SignedInteger {
19101911
/// The number of bits used for the underlying binary representation of

test/api-digester/Outputs/cake-abi.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1745,6 +1745,13 @@
17451745
"usr": "s:s25LosslessStringConvertibleP",
17461746
"mangledName": "$ss25LosslessStringConvertibleP"
17471747
},
1748+
{
1749+
"kind": "Conformance",
1750+
"name": "_BitwiseCopyable",
1751+
"printedName": "_BitwiseCopyable",
1752+
"usr": "s:s16_BitwiseCopyableP",
1753+
"mangledName": "$ss16_BitwiseCopyableP"
1754+
},
17481755
{
17491756
"kind": "Conformance",
17501757
"name": "SignedNumeric",
@@ -2022,13 +2029,6 @@
20222029
],
20232030
"usr": "s:s10SIMDScalarP",
20242031
"mangledName": "$ss10SIMDScalarP"
2025-
},
2026-
{
2027-
"kind": "Conformance",
2028-
"name": "_BitwiseCopyable",
2029-
"printedName": "_BitwiseCopyable",
2030-
"usr": "s:s16_BitwiseCopyableP",
2031-
"mangledName": "$ss16_BitwiseCopyableP"
20322032
}
20332033
]
20342034
}

test/api-digester/Outputs/stability-stdlib-source-x86_64.swift.expected

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,4 @@ Func withoutActuallyEscaping(_:do:) is now without @rethrows
4848

4949
Protocol SIMDScalar has generic signature change from <Self == Self.SIMD16Storage.Scalar, Self.SIMD16Storage : Swift.SIMDStorage, Self.SIMD2Storage : Swift.SIMDStorage, Self.SIMD32Storage : Swift.SIMDStorage, Self.SIMD4Storage : Swift.SIMDStorage, Self.SIMD64Storage : Swift.SIMDStorage, Self.SIMD8Storage : Swift.SIMDStorage, Self.SIMDMaskScalar : Swift.FixedWidthInteger, Self.SIMDMaskScalar : Swift.SIMDScalar, Self.SIMDMaskScalar : Swift.SignedInteger, Self.SIMD16Storage.Scalar == Self.SIMD2Storage.Scalar, Self.SIMD2Storage.Scalar == Self.SIMD32Storage.Scalar, Self.SIMD32Storage.Scalar == Self.SIMD4Storage.Scalar, Self.SIMD4Storage.Scalar == Self.SIMD64Storage.Scalar, Self.SIMD64Storage.Scalar == Self.SIMD8Storage.Scalar> to <Self : Swift._BitwiseCopyable, Self == Self.SIMD16Storage.Scalar, Self.SIMD16Storage : Swift.SIMDStorage, Self.SIMD2Storage : Swift.SIMDStorage, Self.SIMD32Storage : Swift.SIMDStorage, Self.SIMD4Storage : Swift.SIMDStorage, Self.SIMD64Storage : Swift.SIMDStorage, Self.SIMD8Storage : Swift.SIMDStorage, Self.SIMDMaskScalar : Swift.FixedWidthInteger, Self.SIMDMaskScalar : Swift.SIMDScalar, Self.SIMDMaskScalar : Swift.SignedInteger, Self.SIMDMaskScalar == Self.SIMDMaskScalar.SIMDMaskScalar, Self.SIMD16Storage.Scalar == Self.SIMD2Storage.Scalar, Self.SIMD2Storage.Scalar == Self.SIMD32Storage.Scalar, Self.SIMD32Storage.Scalar == Self.SIMD4Storage.Scalar, Self.SIMD4Storage.Scalar == Self.SIMD64Storage.Scalar, Self.SIMD64Storage.Scalar == Self.SIMD8Storage.Scalar>
5050
Protocol SIMDStorage has generic signature change from <Self.Scalar : Swift.Decodable, Self.Scalar : Swift.Encodable, Self.Scalar : Swift.Hashable> to <Self : Swift._BitwiseCopyable, Self.Scalar : Swift.Decodable, Self.Scalar : Swift.Encodable, Self.Scalar : Swift.Hashable>
51+
Protocol FixedWidthInteger has generic signature change from <Self : Swift.BinaryInteger, Self : Swift.LosslessStringConvertible, Self.Magnitude : Swift.FixedWidthInteger, Self.Magnitude : Swift.UnsignedInteger, Self.Stride : Swift.FixedWidthInteger, Self.Stride : Swift.SignedInteger> to <Self : Swift.BinaryInteger, Self : Swift.LosslessStringConvertible, Self : Swift._BitwiseCopyable, Self.Magnitude : Swift.FixedWidthInteger, Self.Magnitude : Swift.UnsignedInteger, Self.Stride : Swift.FixedWidthInteger, Self.Stride : Swift.SignedInteger>

test/api-digester/stability-stdlib-abi-without-asserts.test

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,5 +179,8 @@ Protocol SIMDStorage has added inherited protocol _BitwiseCopyable
179179
Protocol SIMDStorage has generic signature change from <Self.Scalar : Swift.Decodable, Self.Scalar : Swift.Encodable, Self.Scalar : Swift.Hashable> to <Self : Swift._BitwiseCopyable, Self.Scalar : Swift.Decodable, Self.Scalar : Swift.Encodable, Self.Scalar : Swift.Hashable>
180180
Protocol _Pointer has added inherited protocol _BitwiseCopyable
181181
Protocol _Pointer has generic signature change from <Self : Swift.CustomDebugStringConvertible, Self : Swift.CustomReflectable, Self : Swift.Hashable, Self : Swift.Strideable> to <Self : Swift.CustomDebugStringConvertible, Self : Swift.CustomReflectable, Self : Swift.Hashable, Self : Swift.Strideable, Self : Swift._BitwiseCopyable>
182+
Protocol FixedWidthInteger has added inherited protocol _BitwiseCopyable
183+
Protocol FixedWidthInteger has generic signature change from <Self : Swift.BinaryInteger, Self : Swift.LosslessStringConvertible, Self.Magnitude : Swift.FixedWidthInteger, Self.Magnitude : Swift.UnsignedInteger, Self.Stride : Swift.FixedWidthInteger, Self.Stride : Swift.SignedInteger> to <Self : Swift.BinaryInteger, Self : Swift.LosslessStringConvertible, Self : Swift._BitwiseCopyable, Self.Magnitude : Swift.FixedWidthInteger, Self.Magnitude : Swift.UnsignedInteger, Self.Stride : Swift.FixedWidthInteger, Self.Stride : Swift.SignedInteger>
184+
182185

183186
// *** DO NOT DISABLE OR XFAIL THIS TEST. *** (See comment above.)

0 commit comments

Comments
 (0)