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

Elide unit variables linted by let_unit and use () directly instead #12603

Merged
merged 1 commit into from Apr 1, 2024

Commits on Apr 1, 2024

  1. Replace elided variable in let_unit with () when used

    Situation: `let_unit` lints when an expression binds a unit (`()`)
    to a variable. In some cases this binding may be passed down to
    another function. Currently, the lint removes the binding without
    considering usage.
    
    Change: All usages of the elided variable are now replaced with `()`.
    
    fixes: rust-lang#12594
    m-rph committed Apr 1, 2024
    Configuration menu
    Copy the full SHA
    eee4db9 View commit details
    Browse the repository at this point in the history