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

Add allow-by-default lint for unit bindings #112380

Merged
merged 1 commit into from
Nov 22, 2023

Commits on Nov 20, 2023

  1. Add allow-by-default lint for unit bindings

    This lint is not triggered if any of the following conditions are met:
    
    - The user explicitly annotates the binding with the `()` type.
    - The binding is from a macro expansion.
    - The user explicitly wrote `let () = init;`
    - The user explicitly wrote `let pat = ();`. This is allowed for local
      lifetimes.
    jieyouxu committed Nov 20, 2023
    Configuration menu
    Copy the full SHA
    8da09ae View commit details
    Browse the repository at this point in the history