S0044: unknown field in construction
Generated from rellum-diagnostics/src/db.rs.
Explanation
Record and enum variant constructors may provide only fields declared by the target type or variant. Unknown fields have no storage slot in the value being constructed.
Common causes
- misspelling a field name in a record constructor
- using a field from another record type
- providing a field that belongs to a different enum variant
Canonical fixes
- use a declared field name
Before:
point = Point { x: 0, width: 0 }
After:
point = Point { x: 0, y: 0 }
- add the field to the type definition if it should exist
Code example
point = Point { x: 0, width: 0 }