E1148: struct field of an arena type that is not `erg`
A struct that holds an arena owns it, as a struct that holds a Buffer owns the buffer (ADR-0130).
A struct that holds an arena owns it, as a struct that holds a Buffer owns the
buffer (ADR-0130). The field that holds the arena is therefore declared erg:
a field with no role, or an abs field, would leave the ownership of the arena
unstated, and a view of an arena cannot place into it. An ins field stays the
error it always was (E1094), and a meta copy struct with an arena field is
E1146, because an arena cannot be copied. The message names the field and the
struct, and the error points at the field.
Example
Fix
Declare the field erg. The struct then owns the arena and places into it
through the field.
Run actus explain E1148 in your terminal to read this entry offline. Browse Modules & rules or all error codes.