@@ -266,8 +266,9 @@ public struct UnsafePointer<Pointee>: _Pointer {
266
266
/// pointer to `Int64`, then accesses a property on the signed integer.
267
267
///
268
268
/// let uint64Pointer: UnsafePointer<UInt64> = fetchValue()
269
- /// let isNegative = uint64Pointer.withMemoryRebound(to: Int64.self,
270
- /// capacity: 1) {
269
+ /// let isNegative = uint64Pointer.withMemoryRebound(
270
+ /// to: Int64.self, capacity: 1
271
+ /// ) {
271
272
/// return $0.pointee < 0
272
273
/// }
273
274
///
@@ -308,7 +309,8 @@ public struct UnsafePointer<Pointee>: _Pointer {
308
309
// This custom silgen name is chosen to not interfere with the old ABI
309
310
@_silgen_name ( " _swift_se0333_UnsafePointer_withMemoryRebound " )
310
311
public func withMemoryRebound< T, Result> (
311
- to type: T . Type , capacity count: Int ,
312
+ to type: T . Type ,
313
+ capacity count: Int ,
312
314
_ body: ( _ pointer: UnsafePointer < T > ) throws -> Result
313
315
) rethrows -> Result {
314
316
_debugPrecondition (
@@ -952,8 +954,8 @@ public struct UnsafeMutablePointer<Pointee>: _Pointer {
952
954
/// pointer to `Int64`, then modifies the signed integer.
953
955
///
954
956
/// let uint64Pointer: UnsafeMutablePointer<UInt64> = fetchValue()
955
- /// uint64Pointer.withMemoryRebound(to: Int64.self, capacity: 1) { ptr in
956
- /// ptr .pointee.negate()
957
+ /// uint64Pointer.withMemoryRebound(to: Int64.self, capacity: 1) {
958
+ /// $0 .pointee.negate()
957
959
/// }
958
960
///
959
961
/// Because this pointer's memory is no longer bound to its `Pointee` type
@@ -993,7 +995,8 @@ public struct UnsafeMutablePointer<Pointee>: _Pointer {
993
995
// This custom silgen name is chosen to not interfere with the old ABI
994
996
@_silgen_name ( " $_swift_se0333_UnsafeMutablePointer_withMemoryRebound " )
995
997
public func withMemoryRebound< T, Result> (
996
- to type: T . Type , capacity count: Int ,
998
+ to type: T . Type ,
999
+ capacity count: Int ,
997
1000
_ body: ( _ pointer: UnsafeMutablePointer < T > ) throws -> Result
998
1001
) rethrows -> Result {
999
1002
_debugPrecondition (
0 commit comments