E1040: unknown enum variant
An enum has a closed set of variants.
An enum has a closed set of variants. A constructor such as Color.Green or a
pattern in a case names a variant that the enum does not declare. The
message names the variant and the enum, and the error points at the name. In
a case, a misspelt variant is reported here, not as a missing variant.
Example
actus
Fix
Use a variant that the enum declares, or add the variant to the enum.
actus check --format json offers this as a fix: rename the variant to the one declared variant whose name is close (a safe fix); nothing is offered when two variants are equally close.
actus
Run actus explain E1040 in your terminal to read this entry offline. Browse Ownership & types or all error codes.