Skip to content

Commit a961161

Browse files
committed
Properly mark the closure parameter to withUnsafeMutablePointers as being
@NoEscape. It doesn't escape the parameter, and callers are passing their @NoEscape values down to it. This isn't being caught so far due to a bug in the type checker that is about to be fixed.
1 parent d0a1b97 commit a961161

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

stdlib/public/core/ManagedBuffer.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ public struct ManagedBufferPointer<Value, Element> : Equatable {
279279
/// - Note: These pointers are only valid for the duration of the
280280
/// call to `body`.
281281
public func withUnsafeMutablePointers<R>(
282-
_ body: (_: UnsafeMutablePointer<Value>, _: UnsafeMutablePointer<Element>) -> R
282+
_ body: @noescape (_: UnsafeMutablePointer<Value>, _: UnsafeMutablePointer<Element>) -> R
283283
) -> R {
284284
let result = body(_valuePointer, _elementPointer)
285285
_fixLifetime(_nativeBuffer)

0 commit comments

Comments
 (0)