E1042: argument name does not fit the enum variant
A variant declared with named fields, such as Circle { radius: u32, }, is built with named arguments that match those fields.
A variant declared with named fields, such as Circle { radius: u32, }, is
built with named arguments that match those fields. A variant declared with
positional fields takes positional arguments only. A name that the variant
does not have, a name on a positional variant, or a missing name on a named
variant are all rejected. For a positional argument given to a named variant
the message says that the variant takes named fields. The error points at the
argument.
Example
actus
Fix
Use the field name that the variant declares.
actus
Run actus explain E1042 in your terminal to read this entry offline. Browse Ownership & types or all error codes.