Skip to content

Commit 367d71d

Browse files
committed
Revert "[stdlib] Uncheck pointers' conf to BitwiseCopyable"
This reverts commit 4dc9713.
1 parent a74eb6b commit 367d71d

File tree

6 files changed

+7
-14
lines changed

6 files changed

+7
-14
lines changed

stdlib/public/core/BridgeObjectiveC.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,7 @@ public func _getBridgedNonVerbatimObjectiveCType<T>(_: T.Type) -> Any.Type?
407407
/// already have writeback-scoped lifetime.
408408
@frozen
409409
public struct AutoreleasingUnsafeMutablePointer<Pointee /* TODO : class */>
410-
: _Pointer, @unchecked _BitwiseCopyable {
410+
: _Pointer {
411411

412412
public let _rawValue: Builtin.RawPointer
413413

stdlib/public/core/CTypes.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ public typealias CBool = Bool
142142
/// Opaque pointers are used to represent C pointers to types that
143143
/// cannot be represented in Swift, such as incomplete struct types.
144144
@frozen
145-
public struct OpaquePointer : @unchecked _BitwiseCopyable {
145+
public struct OpaquePointer {
146146
@usableFromInline
147147
internal var _rawValue: Builtin.RawPointer
148148

stdlib/public/core/UnsafeBufferPointer.swift.gyb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,7 @@
3030
/// collection with an `${Self}` instance copies the instances out of the
3131
/// referenced memory and into the new collection.
3232
@frozen // unsafe-performance
33-
public struct Unsafe${Mutable}BufferPointer<Element>
34-
: @unchecked _BitwiseCopyable {
33+
public struct Unsafe${Mutable}BufferPointer<Element> {
3534

3635
@usableFromInline
3736
let _position: Unsafe${Mutable}Pointer<Element>?

stdlib/public/core/UnsafePointer.swift

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@
205205
/// let numberPointer = UnsafePointer<Int>(&number)
206206
/// // Accessing 'numberPointer' is undefined behavior.
207207
@frozen // unsafe-performance
208-
public struct UnsafePointer<Pointee>: _Pointer, @unchecked _BitwiseCopyable {
208+
public struct UnsafePointer<Pointee>: _Pointer {
209209

210210
/// A type that represents the distance between two pointers.
211211
public typealias Distance = Int
@@ -578,8 +578,7 @@ public struct UnsafePointer<Pointee>: _Pointer, @unchecked _BitwiseCopyable {
578578
/// let numberPointer = UnsafeMutablePointer<Int>(&number)
579579
/// // Accessing 'numberPointer' is undefined behavior.
580580
@frozen // unsafe-performance
581-
public struct UnsafeMutablePointer<Pointee>
582-
: _Pointer, @unchecked _BitwiseCopyable {
581+
public struct UnsafeMutablePointer<Pointee>: _Pointer {
583582

584583
/// A type that represents the distance between two pointers.
585584
public typealias Distance = Int

stdlib/public/core/UnsafeRawPointer.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@
169169
/// let numberPointer = UnsafeRawPointer(&number)
170170
/// // Accessing 'numberPointer' is undefined behavior.
171171
@frozen
172-
public struct UnsafeRawPointer: _Pointer, @unchecked _BitwiseCopyable {
172+
public struct UnsafeRawPointer: _Pointer {
173173

174174
public typealias Pointee = UInt8
175175

@@ -727,7 +727,7 @@ extension UnsafeRawPointer {
727727
/// let numberPointer = UnsafeMutableRawPointer(&number)
728728
/// // Accessing 'numberPointer' is undefined behavior.
729729
@frozen
730-
public struct UnsafeMutableRawPointer: _Pointer, @unchecked _BitwiseCopyable {
730+
public struct UnsafeMutableRawPointer: _Pointer {
731731

732732
public typealias Pointee = UInt8
733733

test/SourceKit/DocSupport/doc_clang_module.swift.response

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5654,11 +5654,6 @@ var FooSubUnnamedEnumeratorA1: Int { get }
56545654
key.kind: source.lang.swift.ref.protocol,
56555655
key.name: "_Pointer",
56565656
key.usr: "s:s8_PointerP"
5657-
},
5658-
{
5659-
key.kind: source.lang.swift.ref.protocol,
5660-
key.name: "_BitwiseCopyable",
5661-
key.usr: "s:s16_BitwiseCopyableP"
56625657
}
56635658
]
56645659
},

0 commit comments

Comments
 (0)