Skip to content

Commit 0ccfa42

Browse files
committed
[stdlib] convert _withUnprotectedUnsafeMutablePointer() to typed throws
1 parent 44c2c07 commit 0ccfa42

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

stdlib/public/core/LifetimeManager.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,10 @@ public func withUnsafeMutablePointer<T, Result>(
8787
/// This function is similar to `withUnsafeMutablePointer`, except that it
8888
/// doesn't trigger stack protection for the pointer.
8989
@_alwaysEmitIntoClient
90-
public func _withUnprotectedUnsafeMutablePointer<T, Result>(
90+
public func _withUnprotectedUnsafeMutablePointer<T, E: Error, Result>(
9191
to value: inout T,
92-
_ body: (UnsafeMutablePointer<T>) throws -> Result
93-
) rethrows -> Result
92+
_ body: (UnsafeMutablePointer<T>) throws(E) -> Result
93+
) throws(E) -> Result
9494
{
9595
#if $BuiltinUnprotectedAddressOf
9696
return try body(UnsafeMutablePointer<T>(Builtin.unprotectedAddressOf(&value)))

0 commit comments

Comments
 (0)