E5017 Runtime Errors
immutable-struct
cannot modify field of const struct
When this occurs
Attempting to modify a field of a struct instance that was declared as const (immutable)
Example error message
error[E5017]:
cannot modify field of immutable struct 'p' (declared as const)
How to fix
Use `temp` instead of `const` when declaring a struct instance that you need to modify.