# Unable to use nested withUnsafePointer(to:\_:) with parameters marked \`borrowing\`

**URL:** <https://forums.swift.org/t/unable-to-use-nested-withunsafepointer-to-with-parameters-marked-borrowing/83474>\
**Category:** Using Swift\
**Created:** [November 30, 2025, 6:05pm UTC](https://forums.swift.org/t/unable-to-use-nested-withunsafepointer-to-with-parameters-marked-borrowing/83474 "2025-11-30T18:05:56Z")\
**Posts on this page:** 1\
**Showing post:** 11

<div class="post-metadata">

**Author:** ![ksluder](https://avatars.discourse-cdn.com/v4/letter/k/eada6e/32.png) [@ksluder](https://forums.swift.org/u/ksluder)\
**Post date:** [November 30, 2025, 6:56pm UTC](https://forums.swift.org/t/unable-to-use-nested-withunsafepointer-to-with-parameters-marked-borrowing/83474/11 "2025-11-30T18:56:15Z")

</div>

I don’t think `borrowing` would have the effect you think it would, because I don’t think `VkAllocationCallbacks` is going to be imported as `~Copyable`. So [per Joe’s explanation](https://forums.swift.org/t/what-do-borrowing-parameters-do-to-copyable-types/81217/2), the `borrowing` keyword won’t have any effect on the calling convention since `borrowing` is already the default for function arguments.

> [@needlesslygrim](#):
>
> Passing both as arguments just shifts the error down:  
> […]  
> and trying to use `withoutActuallyEscaping(_:do:)` within the first onen doesn’t work:

Can you share these errors, please?

I did find [a related thread](https://forums.swift.org/t/borrowing-nested-withunsafepointer-cannot-be-captured-by-an-escaping-closure-since-it-is-a-borrowed-parameter/80210/8) from this summer where someone encountered the same issue with SDL, but there was no satisfying result.

Unfortunately, I don’t think you can use `borrowing` to force your desired calling convention without making the type non-copyable, which can only be done by creating your own `~Copyable` wrapper type.

---

_[View the full topic](https://forums.swift.org/t/unable-to-use-nested-withunsafepointer-to-with-parameters-marked-borrowing/83474)._
