Skip to content

Commit a61d9d0

Browse files
author
Max Moiseev
committed
[stdlib] availability attributes for UnsafePointer.destroy
1 parent 234bc28 commit a61d9d0

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

stdlib/public/core/UnsafePointer.swift.gyb

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -573,6 +573,16 @@ extension ${Self} {
573573
public func initialize(newvalue: Pointee) {
574574
fatalError("unavailable function can't be called")
575575
}
576+
577+
@available(*, unavailable, renamed="deinitialize(count:)")
578+
public func destroy() {
579+
fatalError("unavailable function can't be called")
580+
}
581+
582+
@available(*, unavailable, renamed="deinitialize(count:)")
583+
public func destroy(count: Int) {
584+
fatalError("unavailable function can't be called")
585+
}
576586
}
577587
% end # for mutable
578588

0 commit comments

Comments
 (0)