E1065: one call borrows the same value twice
An ins argument is an exclusive loan of its owner for the length of the call (ADR-0020).
An ins argument is an exclusive loan of its owner for the length of the call
(ADR-0020). No other argument of that call may name the same owner, because
the callee would then see one value through two paths and could change it
while the other path looks at it. The rule covers two ins arguments and an
ins next to an abs argument. Different fields of one struct do not clash.
The message names the owner. The error points at the second argument.
Example
actus
actus
Fix
Pass distinct owners, or split the work into two calls, because a loan ends when its call returns.
actus
actus
Run actus explain E1065 in your terminal to read this entry offline. Browse Ownership & types or all error codes.