E1149: a holder field holds a value of the holder's own arena
A struct that holds an arena releases it itself (ADR-0130).
A struct that holds an arena releases it itself (ADR-0130). A field of that struct cannot hold a value placed in the same arena, or a view of such a value: the holder would contain a reference into storage that it releases, and the release order of its fields could not keep both valid. The error points at the field initializer of a struct literal, or at the assignment that stores the value into the field. The message names the field and the holder.
A value placed in another arena is a different case. A struct literal cannot
mix the arena it takes with a value of another arena (E1078), and a field
assignment of a value of another arena follows the existing provenance rules.
Example
Fix
Store a value that is not placed in the holder's arena, or keep a result
computed from the placed value, such as its Int field.
Run actus explain E1149 in your terminal to read this entry offline. Browse Modules & rules or all error codes.