Duolith docs

Errors E0600 to E0699

E0606 Default that does not fit its field

Message the default of `field` is not a type

Words in italics are filled in when the compiler reports it, such as the element's name or the list of known ones.

Why

A default (= value) is what a caller gets when they leave the field out, so it must be a value the field's own validator would accept: within its limits, one of its choices, the right kind of value.

How to fix it

Write a default the field accepts, or leave the default out and make the field optional with ?.

In a terminal

duolith explain E0606