Skip to content

Commit d4abcde

Browse files
authored
Merge pull request #72233 from glessard/toplevel-withUUMP-typed-throws
[stdlib] convert `_withUnprotectedUnsafeMutablePointer()` to typed throws
2 parents 8dba0f6 + 0ccfa42 commit d4abcde

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
@@ -96,10 +96,10 @@ func __abi_se0413_withUnsafeMutablePointer<T, Result>(
9696
/// This function is similar to `withUnsafeMutablePointer`, except that it
9797
/// doesn't trigger stack protection for the pointer.
9898
@_alwaysEmitIntoClient
99-
public func _withUnprotectedUnsafeMutablePointer<T, Result>(
99+
public func _withUnprotectedUnsafeMutablePointer<T, E: Error, Result>(
100100
to value: inout T,
101-
_ body: (UnsafeMutablePointer<T>) throws -> Result
102-
) rethrows -> Result
101+
_ body: (UnsafeMutablePointer<T>) throws(E) -> Result
102+
) throws(E) -> Result
103103
{
104104
#if $BuiltinUnprotectedAddressOf
105105
return try body(UnsafeMutablePointer<T>(Builtin.unprotectedAddressOf(&value)))

0 commit comments

Comments
 (0)