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

Using #[derive(FromDeriveInput)] without #[darling(attributes)] should compile #183

Closed
TedDriggs opened this issue Apr 26, 2022 · 0 comments · Fixed by #185
Closed

Using #[derive(FromDeriveInput)] without #[darling(attributes)] should compile #183

TedDriggs opened this issue Apr 26, 2022 · 0 comments · Fixed by #185
Assignees
Labels

Comments

@TedDriggs
Copy link
Owner

Instead, it fails because of #177

@TedDriggs TedDriggs added the bug label Apr 26, 2022
@TedDriggs TedDriggs self-assigned this Apr 26, 2022
TedDriggs added a commit that referenced this issue Apr 26, 2022
Values for fields are kept in local variables prior to construction in
the `From*` derivations. Before #177, these local variables would be
immutable, since nothing would ever modify them. However, now the
generated code will mutate the local variable to insert the result of
a `from_none` call to the child. Therefore, for simplicity the variables
are always emitted as mutable.

Fixes #183
TedDriggs added a commit that referenced this issue Apr 28, 2022
Values for fields are kept in local variables prior to construction in
the `From*` derivations. Before #177, these local variables would be
immutable, since nothing would ever modify them. However, now the
generated code will mutate the local variable to insert the result of
a `from_none` call to the child. Therefore, for simplicity the variables
are always emitted as mutable.

Fixes #183
TedDriggs added a commit that referenced this issue Apr 28, 2022
Values for fields are kept in local variables prior to construction in
the `From*` derivations. Before #177, these local variables would be
immutable, since nothing would ever modify them. However, now the
generated code will mutate the local variable to insert the result of
a `from_none` call to the child. Therefore, for simplicity the variables
are always emitted as mutable.

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

Successfully merging a pull request may close this issue.

1 participant