-
Notifications
You must be signed in to change notification settings - Fork 89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Combination of #[builder(default = "foo", field(...)] should error out #269
Comments
Is it ignored by the According to the code, we have a check already that will complain if The reason that Can you provide a repro? |
Sure, check out https://github.com/Xion/derive-builder-issue-269 . |
If `field.type` is used without `field.build`, a Move conversion is used instead of the OptionOrDefault conversion. This means that the presence of `field.type` prevents a field-level `default` from doing anything. Standard practice in derive_builder is to produce an error when parameters are not going to be used. Fixes #269
If `field.type` is used without `field.build`, a Move conversion is used instead of the OptionOrDefault conversion. This means that the presence of `field.type` prevents a field-level `default` from doing anything. Standard practice in derive_builder is to produce an error when parameters are not going to be used. Fixes #269
If `field.type` is used without `field.build`, a Move conversion is used instead of the OptionOrDefault conversion. This means that the presence of `field.type` prevents a field-level `default` from doing anything. Standard practice in derive_builder is to produce an error when parameters are not going to be used. Fixes #269
Right now, the
default
value is silently ignored.This is only indirectly hinted at in the docs where it says that a type
T
infield(type="T")
needs to implementDefault
. It is not stated that the provided customdefault
would be ignored, however.The text was updated successfully, but these errors were encountered: