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

Always declare locals as mutable in derived impls #185

Merged
merged 1 commit into from
Apr 28, 2022

Commits on Apr 28, 2022

  1. Always declare locals as mutable in derived impls

    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 committed Apr 28, 2022
    Configuration menu
    Copy the full SHA
    71ecae3 View commit details
    Browse the repository at this point in the history