S0043: missing field in construction
Generated from rellum-diagnostics/src/db.rs.
Explanation
Record and enum variant constructors must provide every declared payload field. Omitting a field would leave part of the value uninitialized.
Common causes
- constructing a record without one of its declared fields
- constructing an enum variant without one of its payload fields
- renaming a field in the type definition without updating construction sites
Canonical fixes
- provide the missing field
Before:
point = Point { x: 0 }
After:
point = Point { x: 0, y: 0 }
- remove the field from the type definition if it is no longer part of the value
Code example
point = Point { x: 0 }