Skip to content
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

forward_attrs is ignored by #[derive(FromAttributes)] #295

Closed
Veetaha opened this issue Jul 7, 2024 · 0 comments · Fixed by #297
Closed

forward_attrs is ignored by #[derive(FromAttributes)] #295

Veetaha opened this issue Jul 7, 2024 · 0 comments · Fixed by #297

Comments

@Veetaha
Copy link
Contributor

Veetaha commented Jul 7, 2024

Reproduction

use darling::FromAttributes;

#[derive(darling::FromAttributes)]
#[darling(attributes(builder, forward_attrs))]
struct Params {
    default: Option<syn::Expr>,
    attrs: Vec<syn::Attributes>,
}

The code generated by darling doesn't compile in this case because it doesn't initialize the attrs field.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant