Skip to content

Commit c2c5c66

Browse files
committed
Add a description of transferring inout parameters.
1 parent a4ad912 commit c2c5c66

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

proposals/NNNN-transferring-parameters-and-results.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,15 @@ struct Y2: P1 {
295295
}
296296
```
297297

298+
### `transferring inout` parameters
299+
300+
A `transferring` parameter can also be marked as `inout`, meaning that the
301+
argument value must be in a disconnected region when passed to the function,
302+
and the parameter value must be in a disconnected region when the function
303+
returns. Inside the function, the `transferring inout` parameter can be merged
304+
with actor-isolated callees or further transferred as long as the parameter is
305+
re-assigned a value in a disconnected region upon function exit.
306+
298307
### Ownership convention for `transferring` parameters
299308

300309
When a call passes an argument to a `transferring` parameter, the caller cannot

0 commit comments

Comments
 (0)