@@ -3484,13 +3484,14 @@ has an escaping function type (not ``[on_stack]``) the closure context will be
3484
3484
allocated with retain count 1 and initialized to contain the values ``%1 ``,
3485
3485
``%2 ``, etc. The closed-over values will not be retained; that must be done
3486
3486
separately before the ``partial_apply ``. The closure does however take ownership
3487
- of the partially applied arguments; when the closure reference count reaches
3488
- zero, the contained values will be destroyed. If the ``partial_apply `` has a
3489
- ``@noescape `` function type (``partial_apply [on_stack] ``) the closure context
3490
- is allocated on the stack and initialized to contain the closed-over values. The
3491
- closed-over values are not retained, lifetime of the closed-over values must be
3492
- managed separately. The lifetime of the stack context of a ``partial_apply
3493
- [on_stack] `` must be terminated with a ``dealloc_stack ``.
3487
+ of the partially applied arguments (except for ``@inout_aliasable `` parameters);
3488
+ when the closure reference count reaches zero, the contained values will be
3489
+ destroyed. If the ``partial_apply `` has a ``@noescape `` function type
3490
+ (``partial_apply [on_stack] ``) the closure context is allocated on the stack and
3491
+ initialized to contain the closed-over values. The closed-over values are not
3492
+ retained, lifetime of the closed-over values must be managed separately. The
3493
+ lifetime of the stack context of a ``partial_apply [on_stack] `` must be
3494
+ terminated with a ``dealloc_stack ``.
3494
3495
3495
3496
If the callee is generic, all of its generic parameters must be bound by the
3496
3497
given substitution list. The arguments are given with these generic
@@ -3499,6 +3500,11 @@ type with the given substitutions applied. The generic parameters themselves
3499
3500
cannot be partially applied; all of them must be bound. The result is always
3500
3501
a concrete function.
3501
3502
3503
+ If an address argument has ``@inout_aliasable `` convention, the closure
3504
+ obtained from ``partial_apply `` will not own its underlying value.
3505
+ The ``@inout_aliasable `` parameter convention is used when a ``@noescape ``
3506
+ closure captures an ``inout `` argument.
3507
+
3502
3508
TODO: The instruction, when applied to a generic function,
3503
3509
currently implicitly performs abstraction difference transformations enabled
3504
3510
by the given substitutions, such as promoting address-only arguments and returns
0 commit comments