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

Replace some magic booleans in match-lowering with enums #126981

Merged
merged 3 commits into from
Jun 30, 2024

Commits on Jun 30, 2024

  1. Replace a magic boolean with enum DeclareLetBindings

    The new enum `DeclareLetBindings` has three variants:
    - `Yes`: Declare `let` bindings as normal, for `if` conditions.
    - `No`: Don't declare bindings, for match guards and let-else.
    - `LetNotPermitted`: Assert that `let` expressions should not occur.
    Zalathar committed Jun 30, 2024
    Configuration menu
    Copy the full SHA
    ad575b0 View commit details
    Browse the repository at this point in the history
  2. Replace a magic boolean with enum EmitStorageLive

    The previous boolean used `true` to indicate that storage-live should _not_ be
    emitted, so all occurrences of `Yes` and `No` should be the logical opposite of
    the previous value.
    Zalathar committed Jun 30, 2024
    Configuration menu
    Copy the full SHA
    3b22589 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    ed07712 View commit details
    Browse the repository at this point in the history